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 DB pooling from 1.0.2 to 1.1 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 DB pooling from 1.0.2 to 1.1" Watch "Struts DB pooling from 1.0.2 to 1.1" New topic

Struts DB pooling from 1.0.2 to 1.1

Oliver Moore
Ranch Hand

Joined: Mar 04, 2003
Posts: 44
Hi all,
I'm trying to upgrade an appliction based on the sample web appliction from Wroxs' Beginning JSP Web Development book. This has a database connection pool created by the code below and initiated by Tomcat from the web.xml. From the error (also attached), the pool is not being started. I'm guessing this is due to the use of a GenericDataSource object.
Is these a simple method to fix this? can I replace the GenericDataSOurce with a BasicDataSource object (org.apache.commons.dbcp.BasicDataSource)?
Would you suggest a different method of pooling all together? Ideally, I'd like to retain the ability to use Tomcats built in form authentication.
Any help would be gratefully recieved.

I agree. Here's the link:
subject: Struts DB pooling from 1.0.2 to 1.1
Similar Threads
NullPointerException At Statement stmt = conn.createStatement();
"Generic" GenericDataSource
How To Access Objects Returned From A Helper/Utility Class?
Create ConnectionPool in ServletContextListener
Looking For Connection Bean For Connection Pool