• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

problem opening taglib tld

 
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 28141
198
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What if I specified the uri path to the tld in a web.xml, and then used that uri in my taglib directive?
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic