Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 92918 invoked from network); 16 Sep 2000 17:30:43 -0000 Received: from unknown (HELO vdcrexc1.orange.ch) (212.215.1.70) by locus.apache.org with SMTP; 16 Sep 2000 17:30:43 -0000 Received: by vdcrexc1.orange.ch with Internet Mail Service (5.5.2650.21) id ; Sat, 16 Sep 2000 19:30:16 +0200 Message-ID: <2B26E094BB13D3118FB3006008214FA5F06F04@vdlaexc0.orange.ch> From: Kitching Simon To: "'tomcat-user@jakarta.apache.org'" Subject: RE: Tomcat an not find JDBC driver on Win98. Date: Sat, 16 Sep 2000 19:30:09 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hi, > -----Original Message----- > From: David Xu [SMTP:david@vendio.com] > Sent: Saturday, September 16, 2000 12:37 AM > To: tomcat-user@jakarta.apache.org > Subject: Tomcat an not find JDBC driver on Win98. > > I installed Tomcat 3.1 on Win98. Since I want to access oracle from my > servlet so I put oracle > JDBC driver classes111b.zip under ..\tomcat\lib. But my servlet complains > that the JDBC driver > class can not be found. So I put the same zip file under > ..\webapps\myapp\lib, it still won't work. > Finally, I modified the tomcat.bat to add classes111b.zip to the > classpath, it works!!! > > I have set up the same thing on a Linux and put classes111b.zip under > ../tomcat/lib and it works. > > Looks to me like Tomcat 3.1 on Win98 can not automatically recognize a zip > file as a classpath. > > Can anybody tell me why? [Kitching Simon] There's nothing magical about how tomcat's classpath gets set up. It's all done with standard shell-script (unix) or batch file (win). Have a look at the difference between "startup.sh" and "startup.bat". startup.sh (used on unix) is clever enough to look for all files in the $TOMCAT_HOME/lib directory, and add them all to the CLASSPATH environment variable. Note that it doesn't care at all what the suffix is, any file gets added to the path, so better not put non-library files in this directory! startup.bat (windows) on the other hand, only adds an explicit set of files to the classpath. Either the author of this wasn't quite as clever as the author of startup.sh, or else it simply wasn't possible to do it in a dos batch file. So you could just go with your current fix of adding it to the classpath on windows before calling the tomcat "startup.bat" file. Or you could hack the tomcat startup.bat file. I suggest, however, that you put the library in your app/WEB-INF/lib directory instead; the point of this is that if you ever move the webapp, or make another installation, then you just need to copy the wepapp directory tree (including WEB-INF) to have a fully-functioning webapp at the other end. If you have special libs in the tomcat directory, then it's harder to move webapps around. Two notes: (a) above you said you tried "webapps/myapp/lib". I presume you mean "webapps/myapp/WEB-INF/lib". (b) I think that tomcat only recognises ".jar" files in the WEB-INF/lib directory, not ".zip", so try changing the suffix on the ".zip" file to the standards-compliant ".jar" suffix. They are *not* the same, although windows developers tend to treat them as identical. One is a compression format, one is a java archive file - they just happen to be compatible at the moment. Hope this answers your question.. Regards, Simon >