Metawerx Java Hosting Small Logo

<taglib>

This parent element specifies the <taglib-uri> and <taglib-location> for a JSP Custom Tag Library.

It is used inside the <jsp-config> section in web.xml, and is required when using TLD (Tag Library Definition) files in Servlets 2.3 and earlier.

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 />

Parent-element:

See Also

navigation
metawerx specific
search
Share
tools
help

referring pages

Share