You are not logged in.
I thought this was a better place for this than the apps forum, apologies if I'm wrong. I am trying to write a simple servlet to connect to mysql. However, no matter where I place the mysql jdbc jar file, I get a tomcat error, database driver not found for jdbc:mysql. I can connect fine from desktop apps. The mysql jar is in the /usr/share/tomcat7/lib dir as well as directly bundled with my war file. Thanks in advance.
edit::Adding the db jars to the $JAVA_HOME/jre/lib/ext allowed tomcat to find them
Last edited by rickeyski (2011-12-14 04:06:24)
Offline
Try putting the mysql jar into the WEB-INF/lib directory of your application. Tomcat should discover it automatically.
Also see http://tomcat.apache.org/tomcat-7.0-doc … howto.html. Maybe that helps, too.
Last edited by i_love_penguins (2011-12-13 17:42:19)
Offline
Thanks, I will try in the java/lib/ext. By bundled in the war file, I meant I had the jar in WEB-INF/lib, and tomcat still didnt find it.
Offline