File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 5: CLASSPATH Setting" Watch "Tomcat 5: CLASSPATH Setting" New topic
Author

Tomcat 5: CLASSPATH Setting

Alton Hernandez
Ranch Hand

Joined: May 30, 2003
Posts: 443
Hi,
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.
Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61448
    
  67

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] [Bear's FrontMan] [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
Thanks.
N Nanda
Ranch Hand

Joined: Feb 09, 2004
Posts: 62
Hi...
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.
.;<tomcat-install-dir>\common\lib\servlet-api.jar;<tomcat-install-dir>\common\lib\jsp-api.jar
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
 
wood burning stoves
 
subject: Tomcat 5: CLASSPATH Setting