I. JSTL library
Standard.jar
Jstl.jar
two. TLD Configuration
1. Non-automatic loading mode
(1) Copy TLD file
Copy the TLD file to the Web-inf TLD folder
(2) Web.xml
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fn</taglib-uri>
<taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
</taglib>
</jsp-config>
(3) referencing taglib in JSP
<%@ taglib prefix= "C" uri= "Http://java.sun.com/jstl/core"%>
2. Automatic loading mode
The Servlet2.4 specification provides automatic loading of TLD files, which are in the Standard.jar Meta-inf folder.
such as: C.tld file provides a description of the core JSTL tag
<taglib xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE"
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "Http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version= "2.0" >
<DESCRIPTION>JSTL 1.1 Core Library</description>
<display-name>jstl core</display-name>
<tlib-version>1.1</tlib-version>
<short-name>c</short-name>
<uri>http://java.sun.com/jsp/jstl/core</uri>
You can see that its reference URI is Http://java.sun.com/jsp/jstl/core
Then reference taglib in the JSP as: <%@ taglib prefix= "C" uri= "Http://java.sun.com/jsp/jstl/core"%>