Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to place jdbc jar files in tomcat

 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\j2sdk1.4.0_01\jre\lib\ext
 
Chris Reeves
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 331
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic