I am looking for a connection bean that provides connection object to a database from a connection pool. I am using
Tomcat. The connection pool has been configured in the $TOMCATHOME\config\server.xml file and JNDI is referenced in the web.xml file.
I know some people use
http://www.bitmechanic.com/projects/jdbcpool/ and are happy with it. But, my machine cannot unzip the .tar file that is downloadable from the bitmechanic. Therefore, I am unable to go for that option.
I have come up with my own simple DBConnecion.java to pass a connection to a controller
servlet (VerificationServlet.java). But, I got NullPointerException because it is a 'null' connection object. And I need help. My code is shown below:
DBConnection.java:
VerificationServlet.java:
[ July 11, 2003: Message edited by: JiaPei Jen ]