Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

tagdir attribute

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can the tagdir attribute indicate a .tld file? Isn't it supposed to indicate a directory, where my .tag files are kept?

The value of tagdir must start with WEB-INF/tags, right? So how do I map .tag files which are inside a JAR file in WEB-INF/lib/*.jar/META-INF/tags?

Cheers.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The tag files inside the jar files (/META-INF/tags) must have a .tld file defined.
 
Thuwaragan Sundaramoorthy
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And here is the sample tag lib definition for a tag file:


source: HFSJ
Refer pg. 500 for further details.
 
Ronaldo Nazario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I think I wasn't clear enough.

My question is about a taglib directive "tagdir" attribute.

<%@ taglib prefix="mine" tagdir="WEB-INF/lib/my.jar/META-INF/tags" %>

That's how I should indicate a directory that has tags inside a .jar?

<%@ taligb prefix="mine" tagdir="WEB-INF/tags/descr.tld" %>

Is that correct? Can I put a .tld file as a value of a tagdir attribute? How would that work?
[ October 11, 2007: Message edited by: Ronaldinho Gaucho ]
 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its not correct. See once you declare a tld file for a tag, normal .tld file rules apply and it should be declare using <%@ taglib prefix="mine" uri="uri_of_tld".%>. Note the uri will be used rather then tagdir.


- Amit Goyal
 
Ronaldo Nazario
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I got it. It makes sense...
So, to use a tag file that is inside a JAR, I just have to use a taglib directive with a uri value that matches the uri from the TLD which is in the JAR.

Cheers!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic