• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

tagdir attribute  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!