Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

please reply somebody need help  RSS feed

 
kamran
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Report post to moderator
i have just started working on struts and i want to connect my jsps to database there is a tag in struts config.xml for database but how will i be accessing database from the jsps are there any tags provided for that b/s i dont want to use expressions in there b/s its not the way MVC is implemented
With regards
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Report post to moderator
I suggest you post your question under the java frameworks forum(which includes Struts)- if your need is urgent. If your need isn't urgent, the moderator will most likely move this post over there anyway. But if your really crunched for time- post it over there.
 
Geoffrey Falk
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Report post to moderator
In MVC, the correct place to put database calls is in your business logic. With Struts, that means they are invoked somehow from your Action classes.
You want to write some data access objects and call them from your Action classes. The Action will then attach a bean to your request or session scope, for the JSP to use.
Geoffrey
 
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!