由于没有人发布实际内容,因此您可以执行以下操作:
在
pom.xml添加:
<dependency> <groupId>org.sitemesh</groupId> <artifactId>sitemesh</artifactId> <version>3.0.0</version></dependency>
在
WEB-INF/web.xml†中添加:
<filter> <filter-name>sitemesh</filter-name> <filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class></filter><filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>/*</url-pattern></filter-mapping>
在
WEB-INF/sitemesh3.xml添加:
<sitemesh> <mapping path="/*" decorator="/WEB-INF/decorator1.jsp"/></sitemesh>
在
WEB-INF/decorator1.jsp添加:
<html> <head> ... </head> <body> <sitemesh:write property='body'/> </body></html>
†如果使用Spring Security,请将其放在Spring Security过滤器链的下方。



