• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Tag File Location !!

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic