This sentence <%@ taglib prefix= "s" uri= "/struts-tags"%> is from the address/struts-tags looking for a tag library, perhaps someone will wonder where this address? The answer is that it's defined in the Struts 2 library file Struts2-core-2.0.11.jar inside the file Meta-inf/struts-tags.tld inside, at the beginning of this file there is such a piece of code:
<?xml version= "1.0" encoding= "UTF-8"?>
<! DOCTYPE taglib Public "-//sun Microsystems, Inc.//dtd JSP Tag Library 1.2//en" "http://java.sun.com/dtd/ Web-jsptaglibrary_1_2.dtd ">
<taglib>
<tlib-version>2.2.3</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>s</short-name>
<uri>/struts-tags</uri>
....
You can notice that the <uri>/struts-tags</uri> of the coarse italic is exactly the same as the URI attribute of the JSP file introduced in the Taglib declaration, so that the corresponding label definition position is found. Web servers such as Tomcat automatically load the. TLD tag definition file under the Meta-inf subdirectory under all jar files, which is why many frameworks do not need to copy TLD files to Web-inf.
The magical application of taglib tags in Jsp