![]() |
![]() |
||||
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.
<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 />
<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 />