Craig, 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 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 10:25 AM To: [EMAIL PROTECTED] 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" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: RE: tomcat4 and JDBCRealm problem > > Craig, > > Thanks for the advice. For grins I wrote a quickie program in java that > connected to the database and > listed the users. It worked fine using the same parameters that were in > 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 > CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar;c:\javali > b\mysql.jar > > Voila!...it worked. > Can you tell me why it didn't pick up the jar file from my NT classpath > or from the lib directory in the TOMCAT_HOME? > That's really simple - the standard startup scripts for Tomcat 4.0 totally ignore whatever CLASSPATH variable you might have installed before starting Tomcat. Classpaths get more users in more trouble than anything 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 $CATALINA_HOME/server/lib. * 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 to > add this little tidbit of info. > It's already there. The online version of the docs included with Tomcat is at: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/realm-howto.html#JDBCRea lm see step 3 under the "Quick Start" instructions. More info on the class loading architecture is also available: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html > Thanks for the help, > Bob Epling > Craig
