Always Include the <uri> Element in the TLD
The
<uri>
element in a JSP Tag Library Descriptor (TLD) is an optional element,
intended for defining a default URI for the tag library that an
authoring tool can use when generating JSP elements:
. . .
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>c</short-name>
<uri>http://java.sun.com/jstl/core</uri>
<display-name>JSTL core</display-name>
<description>JSTL 1.0 core library</description>
. . .The auto-discovery feature introduced in JSP 1.2 relies on the
presence of this otherwise optional element, however. During
application startup, the JSP container scans all files in the
application’s WEB-INF directory
(including the content of JAR files) to locate all TLD files. For
each TLD it finds, it looks for a <uri>
element and records an implicit mapping between the URI and the
location of the TLD file. Therefore, all you need to do to use the
library is specify this default URI in the
taglib
directive; the container figures out
from its mappings where the corresponding TLD file is. This
dramatically simplifies tag library deployment over the mechanisms
available in JSP 1.1, so you should always specify a default URI in
the TLD for tag libraries you develop.