开发者

Remove decorator from error page

We use sitemesh for decorations on our website. We have an error page and we would not like to apply the decorator to it. The error page comes up in case an exception occurs (we hope rarely), not for 404, that's another page.

The error page is called through a spring controller and is defined in web.xml as follows:

<error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/view/errorpage/display</location>
</error-page>

Sitemesh configuration in web.xml is as follows:

<开发者_StackOverflow;filter-mapping>
    <filter-name>sitemesh</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

And finally, the error controller is excluded in decorators.xml as follows:

<excludes>
    <pattern>/view/errorpage*</pattern>
</excludes>

But this doesn't do the trick, since the decorator page is still being applied to the error page. Is there something I am missing out please?

Thanks!

Krt_Malta


This provided my answer:

How to exclude sitemesh filter when resolving error in spring?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜