Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tld inside a jar linked by web.xml

 
Elier Rguez
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know I can link directly from a jsp to a tld located in a jar by uri tag, without using the web.xml file. But I have done a test using the web.xml and it doesn't work.

page.jsp


web.xml



taglibJarExample.jar/META-INF/taglibJar.tld


Error: Unable to read TLD "META-INF/taglib.tld" from JAR file

Why is looking for taglib.tld and not for taglibJar.tld?
If I rename taglibWithinJar.tld to taglib.tld and edit the web.xml, as following, it works fine. Any explanation?

web.xml


Thanks,
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URI has nothing to do with the name of the tld file:

In this case, the container will not look for taglibJarExample.jar/META-INF/anyrandomstring.tld. Inside a jar, the name of the tld should always be taglib.tld. You can check this documentation on this...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic