Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Tomcat 5: CLASSPATH Setting

 
Ranch Hand
Posts: 443
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67498
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that (-classpath $CATALINA_HOME/common/lib/jsp-api.jar) works
Thanks.
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic