tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Tatum <scott.ta...@wcom.com>
Subject Re: mysql jdbc driver
Date Mon, 09 Apr 2001 22:46:17 GMT
The best place depends on how you are going to be using it. There are three
main options:

1. in JAVA_HOME/jre/lib/ext
2. in TOMCAT_HOME/lib
3. in WEB-INF/lib of a given application

I tend to put driver jars like this in 1, since putting it there automatically
makes it available to everything using the JRE. Since I sometimes write
programs outside of Tomcat (e.g. nightly jobs, etc), putting it there makes it
available everywhere automatically, with no changes to the classpath. (note:
only with jdk >= 1.2, which Tomcat requires)

You could put it in 2, if you only need JDBC connectivity to Mysql in your
webapps. You would use #3 if you knew you only needed it for one web app. Jar
files placed in 3 are only visible to the particular web app, jar files placed
in 2 are visible to all web apps, and jar files placed in one are visible
everywhere. Hope this helps.

-Scott
--
Scott Tatum | scott.tatum@wcom.com
Senior Applications Developer, Special Projects
WorldCom | http://www.wcom.com/

Shun-Luoi Daniel Fong wrote:

> I know this isn't necessarily tomcat related but...
>
> I just downloaded the mysql jdbc driver, mm.mysql-2.0.4-src.jar, from
> http://mmmysql.sourceforge.net/
>
> My question is, do I need to just put the jar file in my classpath, or do
> I need to extract the files from the jar file and put them somewhere. If I
> do need to extract the files, does anybody have any suggestions as to a
> good location to place the files/directories? Does it really matter for
> when I am using the driver from jsp/servlets?
>
> I'm using tomcat 3.2.1 on linux
>
> Thanks (and sorry for the misplaced question),
> Luoi
>
> --
> D. Shun-Luoi Fong
> 821 Melrose Avenue
> Iowa City, IA 52246
> email: sdfong@engineering.uiowa.edu
>
> -----------------------
> Colossions 2:8 See to it that no one takes you captive through philosophy
> or empty deception, according to the traditions of men, according to the
> elementary principles of the world, rather than according to Christ.
> -----------------------




Mime
View raw message