Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts sql query grouping

 
sudhir pavan
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lalit Mehra
Ranch Hand
Posts: 384
Eclipse IDE Firefox Browser Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic