正如软件有他的皮肤一样,我们的系统也有自己的皮肤,如果我们的应用系统可以让不同的客户选择自己喜欢的风格,那么我们将会感到无比的开心,难道不是吗?
可以更加容易的使用标记库,更轻松的开发出系统风格一致的系统
Struts基于mvc2的frameWork广泛的应用的j2ee开发领域中,
· configure struts for the webapp
· configure the struts-layout treeview and sort action (just copy the corresponding lines of the struts-config file of the example application)
· copy the struts-layout.jar file into the WEB-INF/lib directory.
· declare the struts-layout tld file in the web.xml file
· copy the menu.jar file from the struts-layout example application into the WEB-INF/lib directory.
· put a version of the common BeanUtils library in the WEB-INF/lib directory if using struts 1.0
· copy the struts-layout.tld file into the WEB-INF directory.
· copy the files in the config and images directory of the struts-layout example application in your new webapp.
· if forward to Tiles definition will be used with sorting or paging on the server, the struts-layout request processor
example:
...
...
...
...
...
...
jsp page:
[
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
]
layout page:
[
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-layout.tld" prefix="layout" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
,使用layout可以更加容易的开发!
【责编:admin】
--------------------next---------------------