当我访问localhost:8080时,我想获得未修饰的index.html。当我访问localhost:8080/admin时,我希望所有页面都被装饰。
我的配置是
<?xml version="1.0" encoding="UTF-8"?>
<sitemesh>
<!-- <mapping path="/" exclude="true"/> not work -->
<mapping path="/index.html" exclude="true"/>
<mapping path="/assets/*" exclude="true"/>
<mapping path="/admin*" decorator="/WEB-INF/decorators/decorator.html"/>
</sitemesh>除非我访问localhost:8080:index.html,否则index.html不会被装饰
发布于 2015-05-06 20:23:01
将MIME类型添加为(mime- TYPE ) text/jsp (/mime-type)。
<mapping path="/" exclude="true"/>请将括号分别替换为'<‘& '>’。
这肯定会奏效的。
https://stackoverflow.com/questions/25802171
复制相似问题