• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Where all in the struts application file, I can find the quries that are written to access database?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am stuck in a struts application where i need to find the quries in that application. I have traversed till the DAO classes, but after that I get the method call to the update() of templet class which runs the quries and returns back the result. Is there any way to find out where the quries might be present?

Please Help....
Thanks In Advance....
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's hard to tell without actually going through the code myself. Struts has little to do with back end tasks like interfacing with databases, so there is great variation in implementation. Do you see any imports with the word "hibernate" in them?
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've seen a lot of projects use either a properties file or a global constants class, both not very good designs in my opinion but nonetheless a very common "practice", to hold all the query strings that are run by the application. If you get to the DAO classes and find references to constants or keys where you'd normally find the query strings, then use an IDE like Eclipse to find everything that references the constants or use your favorite text search tool to search through *all* the files in your project for places where the keys are used.
 
Ranch Hand
Posts: 329
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be you can start from searching for connection string based on DB used and do a sort of reverse engineering to find the references of this "get connection" behavior
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic