Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the classpath for Tomcat 5.5?

 
Ayanik Sil
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
I am using Tomcat 5.5. Can you tell me that what should be in the classpath?
This is my present classpath.

"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\commons-el.ja
r";"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jasper-run
time.jar";"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\nam
ing-factory-dbcp.jar";"C:\Program Files\Apache Software Foundation\Tomcat 5.5\co
mmon\lib\jasper-compiler.jar";"C:\Program Files\Apache Software Foundation\Tomca
t 5.5\common\lib\jsp-api.jar";"C:\Program Files\Apache Software Foundation\Tomca
t 5.5\common\lib\naming-resources.jar";"C:\Program Files\Apache Software Foundat
ion\Tomcat 5.5\common\lib\jasper-compiler-jdt.jar";"C:\Program Files\Apache Soft
ware Foundation\Tomcat 5.5\common\lib\naming-factory.jar";"C:\Program Files\Apac
he Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar";

Should any change needs to be done here?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should not be anything specific to tomcat in the classpath.Even the classpath is ignored by the tomcat's classloaders.

But for compilation of servlet java sources you would need to put the jar in the classpath which has the required classes.
What exactly is your issue ?
[ September 25, 2007: Message edited by: Rahul Bhattacharjee ]
 
Ayanik Sil
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,thanks for replying.
Regarding the above classpath mentioned,
can i put
"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\*.jar"
in the classpath instead of mentioning all the jar files seperately?
 
Tarun Yadav
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ayanik Sil:
Hey,thanks for replying.
Regarding the above classpath mentioned,
can i put
"C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\*.jar"
in the classpath instead of mentioning all the jar files seperately?


You need to mention each JAR individually.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to do?

Like Raul said, Tomcat ignores your classpath when running.

If you are setting up your classpath for developing servlets, the only thing from Tomcat that you should need on your classpath is tomcat/common/lib/servlet-api.jar.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
Ayanik Sil
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shall i have to put all the jar files in my classpath?
or only the servlet-api.jar in the classpath for running Tomcat?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To reiterate what Rahul and Ben have said:

- For running Tomcat, you don't need to put anything in your classpath.

- For developing servlets, you'll need the servlet-api.jar file in your classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic