This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts sql query grouping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts sql query grouping" Watch "Struts sql query grouping" New topic
Author

Struts sql query grouping

sudhir pavan
Ranch Hand

Joined: Sep 01, 2011
Posts: 34
Hi

I am creating a web application in struts2, in which i used many sql queries in different java files.

but i like to group all sql queries of my project in single java file and like to call that java class for the desired query execution.

can you help out from here...............
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Struts is an implementation of the Front Controller Pattern. It has little or nothing to do with how you interact with a database. See the FAQ entry Accessing a Database for the recommended course of action.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Lalit Mehra
Ranch Hand

Joined: Jun 08, 2010
Posts: 384

In case if you are using JDBC you can get the required output by creating a common DAO class for your queries ...

I would suggest you to use hibernate instead



http://plainoldjavaobject.blogspot.in
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts sql query grouping
 
Similar Threads
SQL benchmarking with maven
How to get MSAccess SQL Query using Java
listing hibernate named queries from java
Recursive Java programming method for executing recursive SQL queries
sql query stored in the xml, parsed and executed from java - throws malformed exception