Two Laptop Bag*
The moose likes Tomcat and the fly likes Resource Jar's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Resource Jar Watch "Resource Jar New topic
Author

Resource Jar's

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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

Joined: Feb 20, 2001
Posts: 3695

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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Resource Jar's