• 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

TagLib Error

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, perhaps you can help me figure out why I got error that says: "INTERNAL SERVLET ERROR, Parse error in tag library descriptor, next character must be '>' terminating declaration. I checked every opening and closing tags but still got the same error.
I'm using tomcat3.1 and I have my own directory (ted directory) under webapps directory so the path is c:\tomcat\webapps\ted
I placed my tag handler class in classes folder in ...ted\web-inf\classes and my tag library descriptor in ...ted\web-inf\tlds I placed the jsp file that imports the tag library in ted directory. Actually, I am just copied the example given in the book (Professional Java Server Programming) but it does not work.
I did not package the files into .war or .jar files. Is there someone our there who also had the same experience? Howcome it did not work--I just copied the codes (word for word) from the book.
Also, if I am deploying it without packaging the files, what should I write in "uri=" in my jsp file if I placed my descriptor in ...ted\web-inf\tlds?
<%@ taglib uri="?" prefix="examples" %>
In the book, it is written as <%@ taglib uri="./hello.tld" prefix="examples" %> but still, it did not work. I hope someone can help me run this simple tag.

 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by ted oniger:
Hello, perhaps you can help me figure out why I got error that says: "INTERNAL SERVLET ERROR, Parse error in tag library descriptor, next character must be '>' terminating declaration. I checked every opening and closing tags but still got the same error.
I'm using tomcat3.1 and I have my own directory (ted directory) under webapps directory so the path is c:\tomcat\webapps\ted
I placed my tag handler class in classes folder in ...ted\web-inf\classes and my tag library descriptor in ...ted\web-inf\tlds I placed the jsp file that imports the tag library in ted directory. Actually, I am just copied the example given in the book (Professional Java Server Programming) but it does not work.
I did not package the files into .war or .jar files. Is there someone our there who also had the same experience? Howcome it did not work--I just copied the codes (word for word) from the book.
Also, if I am deploying it without packaging the files, what should I write in "uri=" in my jsp file if I placed my descriptor in ...ted\web-inf\tlds?
<%@ taglib uri="?" prefix="examples" %>
In the book, it is written as <%@ taglib uri="./hello.tld" prefix="examples" %> but still, it did not work. I hope someone can help me run this simple tag.


You need to find and correct the parse error in the TLD!! as long as you gare getting that, you will not be able to use it.
The uri on your page must match the uri specified in the TLD

------------------
I Hope This Helps
Carl Trusiak, SCJP2
 
ted oniger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Carl for the tip. I already found the parse error. Apparently I had a typo error inside my <!DOCTYPE tag. I never realized this error until I ran my files in Resin-1.2.5. When I ran my files there, it gave a parse error and it identified the specific word (which was mispelled) that caused the error.
I guess Tomcat is not that user-friendly. Anyway thanks to all who gave some thoughts to my problem.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic