Two Laptop Bag*
The moose likes Tomcat and the fly likes where to place jdbc jar files in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "where to place jdbc jar files in tomcat" Watch "where to place jdbc jar files in tomcat" New topic
Author

where to place jdbc jar files in tomcat

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
I created a \lib directory under the WEB-INF directory and placed my freetds_jdbc.jar file there. However when I run my program it never finds the jar file. My connection object is always set to null!! I tried placing my .jar file in every /lib directory but the outcome is still the same. Do I need to modify some classpath variable in order for this to work???
Sam Kebab
Ranch Hand

Joined: Jan 23, 2002
Posts: 104
C:\j2sdk1.4.0_01\jre\lib\ext
Chris Reeves
Ranch Hand

Joined: Apr 03, 2002
Posts: 95
Placing the jar in WEB-INF/lib should have worked.
You can also use tomcat/common/lib to share jar files accross all webapps.
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
placed it in there too, but it still didnt work. I placed the jdbc classes(unjared) in the web-inf\classes directory and it worked. Do I need to add something to the web.xml file in order for it to find the .jar??
Dharmin Desai
Ranch Hand

Joined: Feb 28, 2002
Posts: 81
Hai john,
Put all yr jars at <% tomcat home%>\lib OR
<% tomcathome %>\common\lib !
After doing this please check yr classpath - enviornment variable !
and add this path ( of lib or common\lib) there , just before everything !
Regards
Dharmin (SCJP2)


SCJP2 (93%),SCWCD(88%)<br />-------------------------------<br />Never under estimate yr self, just represent yr profile in proper manner.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to place jdbc jar files in tomcat