栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

如何将Sitemesh 3与Spring MVC 3集成在一起?

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何将Sitemesh 3与Spring MVC 3集成在一起?

由于没有人发布实际内容,因此您可以执行以下操作:

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过滤器链的下方。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/573387.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号