I have a Sitemesh filter that will adorn the pages. I configured Spring exceptionResolverso that the whole error goes to a view called error, which then points to WEB-INF/jsp/error.jspthrough InternalResourceViewResolver.
Now the error page is decorated with sitemesh, and I would like to exclude it from the design. Using <exclude>the sitemesh file tag decorator.xmldoes not work. Since the incoming URL can be something ordinary, like /app/login.html, and sitemesh already picks it up and decorates it.
I notice that in Spring, if I have a request @ResponseBodyfor ajax, it will go through the Sitemesh decoration. I wonder how it works? Can I do something errorResolverto bypass sitemesh?
source
share