This week's book giveaway is in the Agile forum.
We're giving away four copies of Fixing your Scrum and have Ryan Ripley & Todd Miller on-line!
See this thread for details.
Win a copy of Fixing your Scrum this week in the Agile 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Taglib and Tagdir question?

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got a question regarding tag files:

According to the HFJS a tag file can be only in the following places:

1) WEB-INF/tags
2) WEB-INF/tags/<subdirectory>
jar file:
3) META-INF/tags
4) META-INF/tags/<subdirectory>

Additionally the extension of the tag file should be: tag
and the name of the tag file and custom tag must match.

Then what is the purpose of using the "tagdir" in the page directive "taglib" i.e.

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

The container by default should search and match my tag with the standard places. The only I can think of is performance optimization.
 
Ranch Hand
Posts: 284
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
tagdir is usedto specify the directory relative to which the container must look for your tagfiles:

You may use
<%@ tagdir="WEB-INF/tags/foo/bar" prefix="myTags" %>

then use a tag like this :
<myTags:atag/> to access a tag file which path is :
/WEB-INF/foo/bar/atag.tag
 
Ernesto Leyva
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok thanks for the answer
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys, but I still don't understand. I agree with Ernesto in that I don't see the point of using tagdir, since the TAG files will still be searched by the container in the 4 places that p. 499 indicates; or will it listen to the tagdir attribute and ignore those 4 places if the attribute exists? In that case, tagdir should not be mandatory, is it?

Frederic, according to your example, where does this 4 places take place?

Pleasy clarify...

--alex


-------------------------
SCJD
 
She'll be back. I'm just gonna wait here. With this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic