• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Errors in compile jsp custom tag, please help

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic