permaculture playing cards
The moose likes Tomcat and the fly likes Tomcat 5: CLASSPATH Setting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5: CLASSPATH Setting" Watch "Tomcat 5: CLASSPATH Setting" New topic

Tomcat 5: CLASSPATH Setting

Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
I'm trying to compile a java program that imports javax.servlet.jsp.tagext.* and I am getting an error message "
cannot resolve symbol". I tried compiling this program with the classpath set to -classpath $CATALINA_HOME/server/lib or -classpath $CATALINA_HOME/common/lib but I still get the same error message. Any ideas ?
My JSPs are compiling and running properly, and they import the same class, so I don't think they are missing.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63874

common/lib contains jar files. You cannot just add the folder containing the jars to the classpath; you must include the jars themselves.

[Asking smart questions] [About Bear] [Books by Bear]
Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
Yes, that (-classpath $CATALINA_HOME/common/lib/jsp-api.jar) works
N Nanda
Ranch Hand

Joined: Feb 09, 2004
Posts: 62
You havn't mentioned which operating system you are using. Anyway I assume you know how to set PATH in your Operating system (through Autoexec.bat file in case of Win98/ME and environment virables setting in case of Win2000/XP). set the classpath to the following string.
After this restart or logout your machine. You won't need to provide classpath option to compile the classes. It'll work automatically.
Hope this'll help you.

Regards<br />--<br />Niranjan Nanda<br />Consultant<br />Capgemini Consulting India <br />Mumbai<br />Phone: 9324951476
I agree. Here's the link:
subject: Tomcat 5: CLASSPATH Setting
It's not a secret anymore!