当要使用struts2的标签时,应引入taglib
<%@taglib uri="/struts-tags" prefix="s" %>
struts-tags.tld在 struts2-core-2.1.6.jar/META-INFO/struts-tags.tld
struts-tags.tld:
<?xml version="1.0" encoding="UTF-8"?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0" xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd">
<description><![CDATA["To make it easier to access dynamic data;
the Apache Struts framework includes a library of custom tags.
The tags interact with the framework's validation and internationalization features;
to ensure that input is correct and output is localized.
The Struts Tags can be used with JSP FreeMarker or Velocity."]]></description>
<display-name>"Struts Tags"</display-name>
<tlib-version>2.2.3</tlib-version>
<short-name>s</short-name>
<uri>/struts-tags</uri>