aspose file tools*
The moose likes Servlets and the fly likes TagLib Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "TagLib Error" Watch "TagLib Error" New topic
Author

TagLib Error

ted oniger
Greenhorn

Joined: Aug 05, 2001
Posts: 16
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.

Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
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


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
ted oniger
Greenhorn

Joined: Aug 05, 2001
Posts: 16
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TagLib Error