File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts sql query grouping" Watch "Struts sql query grouping" New topic

Struts sql query grouping

sudhir pavan
Ranch Hand

Joined: Sep 01, 2011
Posts: 35

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

Joined: Oct 29, 2001
Posts: 9188

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.

[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
I agree. Here's the link:
subject: Struts sql query grouping
It's not a secret anymore!