I have a Sitemesh filter that will decorate pages. I have configured a Spring's exceptionResolver
so that all the error will go to a view called error
which is then pointed to WEB-INF/jsp/error.jsp
through InternalResourceViewResolver
.
Now the error page is decorated by sitemesh and I would like to exclude it from decoration. Using <exclude>
tag of sitemesh decorator.xml
does not work. Because the incoming url may be something as normal as /app/login.html
and sitemesh already catch it and decorate it.
I notice that in Spring if I have a @ResponseBody
for ajax request, it would by pass Sitemesh's decoration. I wonder how it works? Can I make something in the errorResolver
to bypass sitemesh also?