( , ) , . BalusC , .tld, WEB-INF, . , Struts2, OP (v2.1.8), Apache.
Struts2 struts-html.tld - :
struts-tags.tld, META-INF struts2-core-2.1.8.jar Struts, , struts-html.tld Struts1.tiles-jsp.tld, META-INF tiles-jsp-2.0.6.jar , struts-tiles.tld Struts1.- TLD, . SiteMesh, .
html, taglib, Struts, JSP. , . , taglib, , .tld .jar 1.2.8.
. :
- ,
WEB-INF/lib .jar. Struts2. .jar , TLD META-INF. , , , struts2-core-2.1.8.jar, .- When the servlet container loads the TLD, it searches for the element
<uri>inside the root element <taglib>and preserves the mapping between that TLD and its URI. Accordingly, this URI is used in your files .jspto refer to TLDs.
In the case, the struts2-core-2.1.8.jarURI is /struts-tags, and so you need to reference it in a file .jsplike this (you can change the attribute prefixto your liking) ...
<%@ taglib uri="/struts-tags" prefix="s" %>
... and then use it, for example this:
<s:form action="HelloWorld">
(...)
</s:form>
source
share