File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes uri and TLD Resource Path Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "uri and TLD Resource Path" Watch "uri and TLD Resource Path" New topic
Author

uri and TLD Resource Path

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I thought that the mapping of <taglib-uri> to <taglib-location> in the web.xml was needed only when the uri in the taglib directive was set to a symbolic name. However, the JSP 1.2 Spec. pp.107-108, states that the uri attribute in the taglib directive, e.g. <%@ taglib ....%> can be either absolute path (a path with protocol and host) or relative path (a path without protocol and host). Moreoever, relative path may start with "/" or without "/". The JSP 1.2 Spec. further lists three cases of <taglib-uri>, <tablib-location> mapping in the web.xml. Would like to see an examples of what the TLD resource path is for each of the three cases listed below:
CASE 1:
If uri =�ABS_URI�:
Look in the processed web.xml for a taglib entry whose TAGLIB_URI is ABS_URI. If found, the corresponding TABLIB_LOCATION is the TLD resource path. If not found, a translation error is raised.
CASE 2:
If uri =�ROOT_REL_URI�:
Look in the processed web.xml for a taglib entry whose TAGLIB_URI is ROOT_REL_URI. If found, the TABLIB_LOCATION for the taglib entry is the TLD resource path. If no such entry is found, ROOT_REL_URI is the TLD resource path.
CASE 3:
If uri =�NOROOT_REL_URI�:
Look in the processed web.xml for a taglib entry whose TAGLIB_URI is NOROOT_REL_URI. If found, the TABLIB_LOCATION for the taglib entry is the TLD resource path. If no such entry is found, resolve NOROOT_REL_URI relative to the current JSP page where the directive appears.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: uri and TLD Resource Path