taglib uri
A 
taglib uri
 element describes a URI identifying a Tag Library used in the Web 
Application.
PCDATA ::= a URI spec. It may be either an absolute URI 
specification, or a relative URI as in Section 2.5.2.
taglib location
A 
taglib location
 contains the location (as a resource) where to find the Tag Library 
Description File for this Tag Library.
PCDATA ::= a resource location, as indicated in Section 2.5.2, 
where to find the Tag Library Descriptor file.
Example
The use of relative URI specifications enables very short names in the 
taglib
 directive.  
For example:
<%@ taglib uri= /myPRlibrary  prefix= x  %>
and then
  /myPRlibrary
  /WEB INF/tlds/PRlibrary_1_4.tld
5.3.1.2
Default location
If there is no 
taglib uri
 subelement that matches the URI used in a 
taglib
 directive, 
the tag library descriptor will be searched in the location indicated by the URI itself.
This rule only applies to URIs that are relative URI specifications (as in Section 2.5.2).
Example
This rule allows a 
taglib
 directive to refer directly to the TLD.  This arrangement is very 
convenient for quick development at the expense of less flexibility and accountability.  For 
example in the case above, it enables:
<%@ taglib uri= /tlds/PRlibrary_1_4.tld  prefix= x  %>
Chapter 5
Tag Extensions
94




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.