Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tagdir attribute

 
Ronaldo Nazario
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.
 
Thuwaragan Sundaramoorthy
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 ]
 
Amit Goyal
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic