Struts Layout下載地址:http://struts.application-servers.com/index.html
一.配置:
http://struts.application-servers.com/install.html有詳細(xì)的說明
1.把下面的兩端加入到struts-config.xml中:
<action?path="/sort"
?type="fr.improve.struts.taglib.layout.sort.SortAction"
?scope="request"
?validate="false">
< SPAN>action>
????
<action?path="/treeview"
?type="fr.improve.struts.taglib.layout.treeview.TreeviewAction"
?scope="request"
?validate="false">
< SPAN>action>

2.復(fù)制struts-layout.jar到WEB-INF/lib目錄下
3.在web.xml文件中加入:
???<jsp-config>
????<taglib>
?????<taglib-uri>http://struts.application-servers.com/layout< SPAN>taglib-uri>
?????<taglib-location>/WEB-INF/struts-layout.tld< SPAN>taglib-location>
????< SPAN>taglib>
???< SPAN>jsp-config>

4.把struts-layout.tld復(fù)制到WEB-INF目錄下
5.把resources文件下的config文件拷貝到webroot目錄下,并把images目錄下的所有文件拷貝到config目錄下。
二.實(shí)例運(yùn)行:
寫個(gè)一般的jsp,當(dāng)然對(duì)應(yīng)的Action,ActionForm已經(jīng)寫好了。
<%@?taglib?uri="http://struts.application-servers.com/layout"?prefix="layout"%>
<layout:html>
?<layout:form?action="/layout"?styleClass="FORM">
??<layout:text?key="search.name"?property="name"?styleClass="FIELD"/>
??<layout:text?key="search.town"?property="town"?styleClass="FIELD"/>
??<layout:date?key="serach.date"?property="date"?styleClass="LABEL"/>
??<layout:submit>
???<layout:message?key="search.submit"/>
??< SPAN>layout:submit>
?< SPAN>layout:form>
< SPAN>layout:html>

一.配置:
http://struts.application-servers.com/install.html有詳細(xì)的說明
1.把下面的兩端加入到struts-config.xml中:












2.復(fù)制struts-layout.jar到WEB-INF/lib目錄下
3.在web.xml文件中加入:







4.把struts-layout.tld復(fù)制到WEB-INF目錄下
5.把resources文件下的config文件拷貝到webroot目錄下,并把images目錄下的所有文件拷貝到config目錄下。
二.實(shí)例運(yùn)行:
寫個(gè)一般的jsp,當(dāng)然對(duì)應(yīng)的Action,ActionForm已經(jīng)寫好了。












