• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 5: CLASSPATH Setting

 
Alton Hernandez
Ranch Hand
Posts: 443
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
common/lib contains jar files. You cannot just add the folder containing the jars to the classpath; you must include the jars themselves.
 
Alton Hernandez
Ranch Hand
Posts: 443
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that (-classpath $CATALINA_HOME/common/lib/jsp-api.jar) works
Thanks.
 
N Nanda
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic