This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

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!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!