why cann't Tomcat4 find MySQL driver which I put in WEB-INF\classes directory? my bean words fine as a standalone application(CLASSPATH setting is fine), but when I try to use it in my JSP page, Tomcat just cann't find the Driver class, even thought I put org.git.mm.mysql directory structure under my web applicaiton's WEB-INF\classes directory. Class.forName("org.gjt.mm.mysql.Driver").newInstance();
Help please!!! I have been working on it for the past 2 days ( without sleep).
HI, Yes I just installed Tomcat 4.0 and the documentation doesn't say exactly what dir to put the MySQL driver in. Anyone got it working who could tell us where to put it? (the file that is ) Bye,
------------------ Terry Doyle Sun Certified Programmer for Java 2 Platform
Raising Flares debut album 'Ignition' out now
Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Joined: May 30, 2001
UPDATE: Further testing and searching in the MySQL driver suggested long filename in CLASSPATH might be responsible so I altered the driver directory but it still doesn't work!. BTW I'm trying on both W98 and Linux (Suse 7.2 Professional) as I have each OS installed on a separate hard disk. I have jswdk-1.0 working perfectly under both OS with database access but it doesn't support latest JSP and Servlet features and it's slow - very slow. Any help will be apreciated. Thanks, Terry
Joined: May 30, 2001
HI, Just brining this up tio the top again as I still haven't found the solution. As far as I can see the MySQL dirver has to be in the classpath for Sun's JSWDK-1.0 server to work ( and it does ), so why can't Tomcat find it?
Anyone out there see what I'm doing wrong?
Thanks, ------------------ Terry Doyle Sun Certified Programmer for Java 2 Platform
According to the documentation the driver can be placed in several places under tomcat depending on your intention. The $CATALINA_HOME/common/lib directory an area where you can place jar files if you intend to share it amoungst other applications that you might create under tomcat 4.x. If you intend to use the driver specifically for an application and not share it out, then create a lib directory under the WEB-INF directory of your application (context) and place it there. I currently have my mm.mysql-2.0.6.jar file located in the D:\Apache Tomcat 4.0\common\lib area on windows 2000.