sitemesh排除故障
这是我的 sitemesh-decorators.xml 文件内容
<decorators defaultdir="/WEB-INF/sitemesh">
<excludes>
<pattern>*.html*</pattern>
<pattern>*.json*</pattern>
<pattern>*.xml*</pattern>
<pattern>*.download*</pattern>
<pattern>/WEB-INF/views/dashboard/dashboard.jsp</pattern>
</excludes>
<decorator name="minimal" page="minimal.jsp">
<pattern></pattern>
</decorator>
<decorator name="none" page="none.jsp">
<pattern></pattern>
</decorator>
<decorator name="default" page="default.jsp">
<pattern>*</pattern>
</decorator>
</decorators>
,但不排除仪表板,任何想法,我也尝试通过添加单独的页面来更改“默认”标签的模式,但没有效果。
我还尝试在“none”标签中输入排除jsp页面。有人有定制的经验吗?
This is my sitemesh-decorators.xml file content
<decorators defaultdir="/WEB-INF/sitemesh">
<excludes>
<pattern>*.html*</pattern>
<pattern>*.json*</pattern>
<pattern>*.xml*</pattern>
<pattern>*.download*</pattern>
<pattern>/WEB-INF/views/dashboard/dashboard.jsp</pattern>
</excludes>
<decorator name="minimal" page="minimal.jsp">
<pattern></pattern>
</decorator>
<decorator name="none" page="none.jsp">
<pattern></pattern>
</decorator>
<decorator name="default" page="default.jsp">
<pattern>*</pattern>
</decorator>
</decorators>
But the dashboard is not excluded, any ideas, I have tried to change the pattern for the 'default' tag as well by adding individual pages but no effect.
I have also tried to enter the exclude jsp page in the 'none' tag as well. Does anyone have any experience with customising it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我将 sitemesh-decorator.xml 更改为
并在仪表板.jsp 的头部中使用
,它成功了。
这是最好的方法吗?
I altered my sitemesh-decorator.xml to
and used
in my dashboard.jsp's head and it did the trick.
Is this the best way?
我有同样的问题,我解决的方法是添加一个名为“no”的新装饰器:
并将元添加到不想使用装饰器的页面:
I have the same problem,and I solved is by this way that adding a new decorator named "no":
and add the meta to your page that does not want to use decorator:
我们可以这样添加:
参见http://wiki.sitemesh。 org/wiki/display/sitemesh3/Configuring+SiteMesh+3
We can add it like this:
see http://wiki.sitemesh.org/wiki/display/sitemesh3/Configuring+SiteMesh+3