wood burning stoves*
The moose likes JSP and the fly likes problem opening taglib tld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem opening taglib tld" Watch "problem opening taglib tld" New topic
Author

problem opening taglib tld

Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
I have a question about tag library descriptor. I specified in my JSP a URI for the taglibrary descriptor as "/hello". And I placed the tld file in Web-inf directory. The question is when I tried to open the JSP. Tomcat says can not open library descriptor "C:\tomcat\webapp\thisWebApp\hello" I don't know why tomcat doesn't recognize the taglib's uri and trace to the proper tld file but instead taking the uri somehow as a file and could not open it!
Thanks for your help.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

Despite its name, I'm not sure that that's a true URI, but actually a path. The usual approach would be to put your TLD in the WEB-INF directory (which isn't usually URL-accessible) and code the taglib definition like this:
<%@ taglib uri="/WEB-INF/hello.tld" prefix="hi" %>
That's from memory, so it may be a little garbled. You may want to RTFM just to make sure.


Customer surveys are for companies who didn't pay proper attention to begin with.
Cameron Park
Ranch Hand

Joined: Apr 06, 2001
Posts: 371
What if I specified the uri path to the tld in a web.xml, and then used that uri in my taglib directive?
wei shung chung
Greenhorn

Joined: Nov 22, 2001
Posts: 5
I have the same problem. Look at my error message....
==========================================
org.apache.jasper.compiler.CompileException: /www/codejuice/webapps/onjava/welcome2.jsp(0,0) Unable to open taglibrary /WEB-INF/onjavataglib2.tld :
Parse Error in the tag library descriptor: External parameter entity "%[dtd];" has characters after markup.
============================================
Have you found the solution ?
Thanks.
Wei Shung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem opening taglib tld
 
Similar Threads
mention tld file in jsp
TagLib Error
jsp taglib problem in IBM websphere4.0
Custom Tag NOT Compiling
CUSTOM TAG NOT WORKING