aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt on taglib? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt on taglib?" Watch "Doubt on taglib?" New topic
Author

Doubt on taglib?

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9495
    
    2

Hi Guys,

I have the following doubt on taglibs...what is the difference between uri and tagdir attribute for the <@taglib ...>???


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9495
    
    2

Any replies guys for the above post??
madhav changala
Ranch Hand

Joined: Dec 20, 2005
Posts: 57
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


saivenumadhav
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9495
    
    2

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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt on taglib?