You can if you like. Just implement a ServletContextListener to setup a DBCP pool for your webapp and store the resulting DataSource in the ServletContext. Servlets and JSPs can pull it out of the ServletContext later for use. Then have both the DBCP jar and the MySQL jar in your WEB-INF/lib folder.

The only catch is your DataSource won't be available via JNDI any more. The JNDI mechanism of tomcat requires your MySQL jar be in common/lib.

--David

wolverine my wrote:

Hi!

The Tomcat's MySQL DBCP example mentioned that we have to copy the
JDBC Driver's jar $CATALINA_HOME/common/lib. Do we allowed to copy the
jar to WEB-INF/lib? And how can we do that?

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to