• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resource Jar's

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to access a database using a servlet. My database is MySQL. I am using the gjt.mm..... Driver from the JAR resource file. It is telling me no suitable driver and I am wondering if I have my JAR file in the right place for TomCat? I have it in the classes directory where my servlet class file exists. I have also put it in my jdk/lib folder and in my classpath.
If this sounds more like a servlet problem, please move the post.
Thanks
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I got it to work. Here is what I have done with my JAR file that contains my MySQL Driver.
JAR locations
tomcat\lib
j2sdk1.4.0\lib
classpath=j2sdk1.4.0\lib\mm.jar
Do I need that file in all those locations or just one or just 2??
This is not for compiling the source code. This is strickly so that the servlet can find the resource it needs.
Thanks
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.coderanch.com/t/81823/Tomcat/jdbc-oracle-hell

in Tomcat's common/lib directory

And when you compile, you can either use -classpath to include this directory, or put it in the system CLASSPATH (but in another post I make short work of that option).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic