The simple answer is no, you cannot store driver jar files in your
webapp's .war file unless you want to setup and manage your own database
pool. Basically tomcat's internal classloader has to have access to the
driver in addition to your webapp which is why it has to be in
common/lib to begin with.
If you want (and this is probably a better design), write a
ServletContextListener to setup your own favorite pool and store the
resulting DataSource object in the servlet context.
--David
David Goodenough wrote:
With Tomcat 5.5 you can now define things like JDBC DataSources in
META-INF/context.xml in your war files. JDBC DataSources need
drivers, and obviously they can still be stored in common/lib, but
given that they are defined, or rather their use is requested,
through the war file, can the drivers also be put in the war
file? The same question would then apply to other resources like
beans etc.
Putting the files in the war would have the effect of making the
application self contained, so would there be any downsides to
allowing this if it is currently not allowed?
David
---------------------------------------------------------------------
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]