本日主要是看《Spring攻略》部分内容以及去公司拿资料,回来其他时间主要用于对付菜单显示问题,母版页面问题,目前使用siteMash。

下面介绍SiteMash配置

1. 引入jar包sitemesh-3.0-alpha-2.jar

2. 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>
3. WEB-INF/sitemesh3.xml
<sitemesh>
  <mapping path="/*" decorator="/WEB-INF/view/common/layout.jsp"/>
   <mapping path="*login.do*" exclue="true"/>
  <mapping path="*logout.do*" exclue="true"/>
 
</sitemesh>

4. 模板页

<sitemesh:write property='title'></sitemesh:write>

<sitemesh:write property='body'></sitemesh:write>

相关文章:

  • 2021-04-14
  • 2021-11-28
  • 2021-06-03
  • 2021-11-15
  • 2021-07-26
  • 2021-04-24
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-01
  • 2021-05-24
  • 2022-12-23
  • 2021-09-13
  • 2021-12-23
  • 2022-02-01
  • 2021-05-03
相关资源
相似解决方案