This is version 3. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

<taglib-location>

This element is used to declare the location of the JSP Custom Tag Library TLD file.

The location should be specified as a relative path from the application root.

Example 1:

<jsp-config> 
        <taglib> 
               <taglib-uri>mytags</taglib-uri> 
               <taglib-location>/WEB-INF/jsp/mytaglib.tld</taglib-location> 
        </taglib> 
</jsp-config>
Declare this in your JSP file using:
<%@ taglib prefix="mytags" uri="mytags" %>
<mytags:sometag>Test</mytags:sometag>
<mytags:othertag />

Example 2:

<jsp-config> 
	<taglib>
		<taglib-uri>http://metawerx.net/mapp/taglibs</taglib-uri>
		<taglib-location>/WEB-INF/mapp.tld</taglib-location>
	</taglib>
</jsp-config> 
This taglib can be used in your JSP file as follows:
<%@ taglib prefix="mapp" uri="http://metawerx.net/mapp/taglibs" %>
<mapp:sometag>Test</mapp:sometag>
<mapp:othertag />

The <taglib> section is no longer required in web.xml since JSP 2.0 / Servlets 2.4. See the article Removing taglib from web.xml for further details.

Parent-elements:

  • <taglib> - container element which specifies the taglib-uri and taglib-location for declaring a JSP Custom Tag Library

See Also

navigation
metawerx specific
search
Share
tools
help

referring pages

Share