首页 > 其他 > 详细

sitemesh使用

时间:2015-12-27 23:30:45      阅读:298      评论:0      收藏:0      [点我收藏+]

1.使用sitemesh要在web.xml中加一下几行:

<!-- sitmesh 网页布局框架 -->
<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>
  <dispatcher>FORWARD</dispatcher>
  <dispatcher>REQUEST</dispatcher>
</filter-mapping>

2.在WEB-INF下加个配置文件sitemesh3.xml,内容:

<sitemesh>
  <!-- 指明满足“/*”的页面,将被“/WEB-INF/views/decorators/decorator.html”所装饰 -->
  <mapping path="/*" decorator="/WEB-INF/views/decorators/decorator.html" />
  <!-- 指明满足“/exclude.jsp*”的页面,将被排除,不被装饰 -->
  <mapping path="/exclude.jsp*" exclue="true" />

</sitemesh>

sitemesh使用

原文:http://www.cnblogs.com/pangu1/p/5081133.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!