aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tag File Location !! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tag File Location !!" Watch "Tag File Location !!" New topic
Author

Tag File Location !!

Puneet Vashisht
Ranch Hand

Joined: Jul 30, 2005
Posts: 44
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

Joined: Sep 18, 2004
Posts: 380
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 ]

/** Code speaks louder than words */
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
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


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tag File Location !!