Metawerx Java Hosting Small Logo

<taglib-uri>

This element specifies a resource identifier for a JSP Custom Tag Library. It is used inside a <taglib> element.

The identifier can be anything you like. It's sole purpose is to provide a unique reference for the taglib, so that you can use it in the <@ tablib %> declaration in a JSP file.

Some developers use full URIs such as http://www.mysite.com/taglibs/mytaglib. Other developers, including the Struts team use simpler URIs such as tags-html or tags-logic. This simpler version is known as the short name for the uri convention, and protects against outages of the website specified in the URI.

Example

With this declaration in web.xml ...

<jsp-config> 
        <taglib> 
               <taglib-uri>metawerx-networking</taglib-uri> 
               <taglib-location>/WEB-INF/jsp/metawerx-networking.tld</taglib-location> 
        </taglib> 
</jsp-config>

... the following declaration can be used in your JSP file to use the tag library:

<%@ taglib prefix="mn" uri="metawerx-networking" %>
<mn:sometag>Test</mn:sometag>
<mn:othertag />

Parent-element:

See Also

navigation
metawerx specific
search
Share
tools
help

referring pages

Share