This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Make CLASSPATH work in Tomcat 4.1.12 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Make CLASSPATH work in Tomcat 4.1.12" Watch "Make CLASSPATH work in Tomcat 4.1.12" New topic
Author

Make CLASSPATH work in Tomcat 4.1.12

Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
How to do that?
I know that Tomcat 4.x doesn't use System CLASSPATH, I want to force it to use it.. It isn't too much to ask?
I've tried editing setclasspath.sh file but I get

[ November 13, 2002: Message edited by: Chu Tan ]
Justin Chu
Ranch Hand

Joined: Apr 19, 2002
Posts: 209
    
    1
To elaborate the problem I'm facing.
I've many machines with tomcat installed. These tomcat instances would like to share a common set of jars on a networked drive.
If I use Tomcat's recommended method, I've to copy the jars to all the servers whenever there's an update.
System CLASSPATH doesn't work in Tomcat 4.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Rather than 'forcing' Tomcat to do something that it was designed to specifically not do (and for a reason), and rather than introducing a single point of failure for multiple boxes (oops.. that network share went down)..

How about making the laborious process of deploying multiple jars to multiple places a breeze? Sounds like a job for ANT.
smercmu
Greenhorn

Joined: Feb 25, 2002
Posts: 20
You can point to whatever classpath you want by modifying the setClasspath.bat file in the bin directory.
I have had simular situations in which I map the network drive and use a drive letter in my classpath setting. The one major benefit of having tomcat use its own classpath rather than the system classpath is that tomcat won't crash if someone else logs into the machine and changes the enviroment variables. Personally, I set the catalina home and java home variables in the top of startup.bat, then in setclasspath.bat I set any classpath settings I need.
HOpe that helps. I can paste in my files as examples if you still need help.
 
wood burning stoves
 
subject: Make CLASSPATH work in Tomcat 4.1.12
 
Similar Threads
Problem with Tomcat 4.1.27 jars and classes
Tomcat startup problem after adding struts
Tomcat Startup Issues
Even though i have the servlet jar in my tomcat home common lib it is not work
Problem with Tomcat Deployment with Eclipse 3.2