tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: JDBC jar in WEB-INF/lib?
Date Tue, 27 Jun 2006 11:05:52 GMT
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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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


Mime
View raw message