首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >sitemesh 3排除根路径

sitemesh 3排除根路径
EN

Stack Overflow用户
提问于 2014-09-12 14:35:12
回答 1查看 1.4K关注 0票数 0

当我访问localhost:8080时,我想获得未修饰的index.html。当我访问localhost:8080/admin时,我希望所有页面都被装饰。

我的配置是

代码语言:javascript
复制
<?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不会被装饰

EN

回答 1

Stack Overflow用户

发布于 2015-05-06 20:23:01

将MIME类型添加为(mime- TYPE ) text/jsp (/mime-type)。

代码语言:javascript
复制
<mapping path="/" exclude="true"/>

请将括号分别替换为'<‘& '>’。

这肯定会奏效的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25802171

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档