Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Errors in compile jsp custom tag, please help

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I'm reading chapter 8 (Introducing Custom Tags) in the book Pro JSP 2nd edition, and try to experiment the book example. When I tried to compile the JavaScriptExampleTag.java, I got complilation error as:
"package javax.servlet.jsp.tagext does not exit" with the arrow pointing to the statement:
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
I'm using jdk1.3 and tomcat4.0 beta5, and put the Root/servletapi-javadoc/javax/ into the path. but no luck.
Any advice? Thanks much in advance.
Hong
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Root/servletapi-javadoc/javax/
is the location of the documentation for the javax.servlet. etc package, the compiled class library lives in
common/lib/servlet.jar
which is where your CLASSPATH (not path) should point.
(I don't know why the Tomcat 4 b5 changed where jar files live, but there it is.)
Bill

------------------
author of:
 
hong zhang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I added the servlet.jar to CLASSPATH, I still got error message "package javax.servlet.jsp.tagext does not exist" in compile the program JavaScriptExampleTag.java. Are there anything else I missing? Please help. Thanks much.
Hong
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible that there is a servlet.jar or jsdk.jar file from an earlier version of Tomcat or the old JSDK hanging around on your system somewhere? Possibly in your JAVA_HOME\jre\lib\ext directory?
I spent several very frustrating days chasing down an error like this when moving from an early JRun to Tomcat.
Bill
 
hong zhang
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bill, Thanks a lot for the help. I clean up the old version of the servlet.jar and now it works.
Thanks again!
Hong
    Bookmark Topic Watch Topic
  • New Topic