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

tomcat classpath

 
Pirams
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was using Tomcat to develop a small application, where I was using OracleDriver for JDBC access. In order for the Tomcat to see the corresponding zip file(driver file), I had to unzip that file in the WEB-INF\classes directory of my application folder in the Webapps folder in side tocat installation folder.
I couldn't find a way to include the original path of the driver file in the tomcat's classpath. I saw in the Tomcat's documentation that Tomcat doesn't see the system's classpath.
Please let me know anyone, how can I set the classpath so that tomcat can see that file, instead of unzip in to the classes directory.
Thanks
Piram
 
Biju Nair
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The zip file you are referring to may probably be classes11.zip or classes12.zip. Try renaming it to a .jar file and put it in the 'lib' folder inside tomcat folder. This worked in my case.

------------------
--:Biju:--
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, Tomcat 4.x doesn't use System CLASSPATH, so put your oracle jar file in the <CATALINA_HOME>/common/lib directory.

In Tomcat 3.x, this folder was <TOMCAT_HOME>/lib, but it would have also picked it up from wherever it was on your system, as long as it was in the system CLASSPATH
[This message has been edited by Mike Curwen (edited December 27, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic