The tag and TLD files can be referenced in JSP files.
1. For tag files
<% @ Taglib prefix = "UI" tagdir = "/WEB-INF/tags" %>
The tags directory contains several tag files.
But when using <Ti: XXXX>, directory WEB-INF/tags, there must be a XXXX. Tag file and the corresponding.
2. For TLD files
You can reference TLD files in JSP, such
<% @ Taglib uri = "http://struts.apache.org/tags-html" prefix = "html" %>
But what should I do if I check whether the http: // struts.apache.org/tags-html matches?
JSP will find all TLD files under the \ WEB-INF of the current directory and confirm which TLD file the URL corresponds.
When the struts-html.tld file is located, it is found that it corresponds to this URL.
However, when <HTML: yyyyy> is used, there must be a corresponding yyyy item in the TLD file.
There is also a more secure way to add in the WEB-INF/Web. xml
<Taglib>
<Taglib-Uri>
Http://jakarta.apache.org/tomcat/examples-taglib
</Taglib-Uri>
<Taglib-location>
/WEB-INF/JSP/example-taglib.tld
</Taglib-location>
</Taglib>
This indicates success
The tag file is generally used for a small part.Code, Similar to the function of the include file.
TLD files have complex functions and can achieve many advanced functions.