正如軟件有他的皮膚一樣
可以更加容易的使用標記庫
Struts基於mvc
· configure struts for the webapp
· configure the struts
· copy the struts
· declare the struts
· copy the menu
· put a version of the common BeanUtils library in the WEB
· copy the struts
· copy the files in the config and images directory of the struts
· if forward to Tiles definition will be used with sorting or paging on the server
example:
<layout:form action=
<layout:grid cols=
<layout:text key=
<layout:text key=
<layout:text key=
<layout:text key=
<layout:text key=
<layout:text key=
</layout:grid>
<layout:grid cols=
<layout:text key=
<layout:text key=
<layout:text key=
<layout:text key=
</layout:grid>
</layout:form>
<layout:form action=
<layout:row>
<layout:collection name=
<layout:collectionItem title=
<layout:collectionItem title=
<layout:collectionItem title=
<layout:collectionItem title=
</layout:collection>
<layout:column>
<layout:text key=
<layout:text key=
<layout:text key=
</layout:column>
</layout:row>
</layout:form>
<layout:form action=
<layout:grid cols=
<layout:collection name=
<layout:collectionItem title=
<layout:collectionItem title=
<layout:collectionItem title=
<layout:collectionItem title=
</layout:collection>
<layout:column>
<layout:text key=
<layout:text key=
<layout:text key=
</layout:column>
</layout:grid>
<layout:space/>
<layout:grid cols=
<layout:text key=
<layout:text key=
<layout:text key=
<layout:space/>
<layout:text key=
<layout:space/>
</layout:grid>
</layout:form>
jsp page:
[
<%@ page language=
<%@ taglib uri=
<%@ taglib uri=
<html:html locale=
<head>
<title><bean:message key=
<html:base/>
</head>
<body bgcolor=
<html:errors/>
<html:form action=
<table border=
<tr>
<th align=
<bean:message key=
</th>
<td align=
<html:text property=
</td>
</tr>
<tr>
<th align=
<bean:message key=
</th>
<td align=
<html:password property=
redisplay=
</td>
</tr>
<tr>
<td align=
<html:submit property=
</td>
<td align=
<html:reset/>
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
]
layout page:
[
<%@ page language=
<%@ taglib uri=
<%@ taglib uri=
<layout:html locale=
<html:errors property=
<layout:form action=
<layout:field key=
<layout:field key=
<layout:formActions>
<layout:submit property=
<layout:reset/>
</layout:formActions>
</layout:form>
</layout:html>
From:http://tw.wingwit.com/Article/program/Java/ky/201311/28200.html