This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tag File Location !!

 
Puneet Vashisht
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guyz,

According to HFSJ, with tag files u use tagdir instead of uri in taglib directive.

<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>

Then the books tells us about the locations container searchs for finding .tag files.
Now my question is, arent v telling the location of .tag file, using tagdir attribute of taglib. Does container need to search .tag files anyway, or the tagdir attibute has got nothing to do with the location of .tag file.

Thanks and Regards,
Puneet
 
Shivani Chandna
Ranch Hand
Posts: 380
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tagdir attribute - needs to specify actual path - directory of tag file.

As the SPEC's say:

Indicates this prefix is to be used to identify tag extensions
installed in the /WEB-INF/tags/ directory or a subdirectory.
An implicit tag library descriptor is used (see Section JSP.8.4
for details). A translation error must occur if the value does
not start with /WEB-INF/tags/. A translation error must occur
if the value does not point to a directory that exists. A
translation error must occur if used in conjunction with the
uri attribute



Whereas uri may or may not. It is in this that the container searches for the TLD in various locations.
[ July 21, 2006: Message edited by: Shivani Chandna ]
 
Narendra Dhande
Ranch Hand
Posts: 951
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Now my question is, arent v telling the location of .tag file, using tagdir attribute of taglib. Does container need to search .tag files anyway, or the tagdir attibute has got nothing to do with the location of .tag file.


If I understand your question correctly, the containe always search and build the implicit tag map for your .tag files placed under /WEB-INF/tags directory or subdirectory of it. When you want to use these implicit tag libraries in your page you need the prefig to use the tag handler for the particular tag file. For thet purpose the taglib entry with tagdir attribute is used to assign the prefix.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic