Where do I install the JDBC driver ZIP files, JAR files & DLLs? How do I ensure they're in Tomcat's CLASSPATH?

Ignacio J. Ortega

Since version 3.2, all the JARS present in the %TOMCAT_HOME%/lib directory are automatically appended to Tomcat's classpath, but only the jars are appended. To have a ZIP automatically appended rename it to *.jar ( as a jar is only a renamed zip ) and voila....

[There are two other options:

  1. Put the jar file in your webapp's WEB-INF/lib/ directory. This set of JARs is added to the classpath for your webapp only. Be careful, however: if a different driver for the same JDBC URL is already on the system classpath, then it may (may!) be loaded instead of yours. (Whether it is or not depends on whether that driver has already been loaded yet.)
  2. Change the Tomcat CLASSPATH environment variable, or "-classpath" command-line option, to contain your JAR or ZIP. This is set in the Tomcat startup script, tomcat.bat/tomcat.sh. Read that file for details on how to edit it.
- Alex ]