Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on taglib?

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I have the following doubt on taglibs...what is the difference between uri and tagdir attribute for the <@taglib ...>???
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any replies guys for the above post??
 
madhav changala
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jyothi

Your questions are not understanding what you need..

Could you please explain indetail..

Here taglib is directive.. uri and prefix are attributes of the taglin directive..

tagdir is another attribute we can use instead of "uri"

Limiataion is we can not use both at a time...

some other limitation liste below


uri="URI"

If the URI is a URL or URN, then the TLD is located by consulting the mapping indicated in web.xml extended using the implicit maps in the packaged tag libraries. If URI is pathname, it is interpreted relative to the root of the web application and should resolve to a TLD file directly, or to a JAR file that has a TLD file at location META-INF/taglib.tld.

tagdir="/WEB-INF/tags[/subdir]+"

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. A translation error must occur under any of these conditions:

The value does not start with /WEB-INF/tags/.
The value does not point to a directory that exists.
If this attribute is used in conjunction with the uri attribute.


Regards

Madhav
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Madhav. I got to understand it now. So you can use either uri or tagdir but not both. uri is for already existing taglibs but tagdir is for the custom ones that we write! Correct me if I'm wrong!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic