tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Epling, Bob" <>
Subject RE: tomcat4 and JDBCRealm problem
Date Tue, 02 Oct 2001 17:07:36 GMT

Thanks for the help...
I guess I need to get my glasses checked...
When I read step 3 I read it as $CATALINA_HOME/lib without the server...
I will read more carefully next time...

Thanks again,
Bob Epling

-----Original Message-----
From: Craig R. McClanahan []
Sent: Tuesday, October 02, 2001 10:25 AM
Subject: RE: tomcat4 and JDBCRealm problem

On Tue, 2 Oct 2001, Epling, Bob wrote:

> Date: Tue, 2 Oct 2001 08:35:18 -0600
> From: "Epling, Bob" <>
> Reply-To:
> To:
> Subject: RE: tomcat4 and JDBCRealm problem
> Craig,
> Thanks for the advice.  For grins I wrote a quickie program in java
> connected to the database and
> listed the users.  It worked fine using the same parameters that were
> the server.xml for Tomcat.
> So, I started to scratch my head some more and took a harder look at
> catalina.bat.
> Even though I had my NT classpath pointing to the mysql.jar, I decided
> to add the mysql.jar path
> to the following line in catalina.bat:
> ---> set
> b\mysql.jar
> Voila! worked.
> Can you tell me why it didn't pick up the jar file from my NT
> or from the lib directory in the TOMCAT_HOME?

That's really simple - the standard startup scripts for Tomcat 4.0
ignore whatever CLASSPATH variable you might have installed before
starting Tomcat.  Classpaths get more users in more trouble than
I have ever seen, so Tomcat uses a different technique:

* If you need a JAR file available to a particular webapp, put it in the
  /WEB-INF/lib directory of that webapp.

* If you need a JAR file available to all web apps (but not to the
  internal classes of Tomcat), put it in $CATALINA_HOME/lib.

* If you need a JAR file available to Tomcat internal classes (as is
  the case with the driver required by JDBCRealm), but it in

* If you need a JAR file available to *both* applications and Tomcat
  internal classes, put it in $CATALINA_HOME/common/lib.

> Maybe the instructions for setting up a JDBCRealm need to be modified
> add this little tidbit of info.

It's already there.  The online version of the docs included with Tomcat
is at:

see step 3 under the "Quick Start" instructions.

More info on the class loading architecture is also available:

> Thanks for the help,
> Bob Epling


View raw message