This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes database interaction in jsps Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "database interaction in jsps" Watch "database interaction in jsps" New topic
Author

database interaction in jsps

Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi all!

Should the database interaction be done in a bean or a servlet when developing jsp applications.
Regards
Danish Shaukat
George Carlson
Greenhorn

Joined: Aug 24, 2000
Posts: 15
I do my actual database interaction using a bean, but I access it through a jsp using the <jsp:useBean id="db" class="ConnectionPool" scope="appliction" /> and then when accessing it, just use db.method. If you need to use it inside another bean, you can just pass it to the bean as a parameter.
If you want my ConnectionPool code, I can pass that to you also.
Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: database interaction in jsps
 
Similar Threads
don't get latest data from database (JSP / Servlet)
Date format
connection in ContextAttribute
Help with MVC
JSF and DB2 interaction