I think I saw it somewhere before but I cannot find it.
My problem is to set different error pages, one for my detailed exception eg. pl.app.MyException and another for every other exception.
My web.xml looks like:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/WEB-INF/jsp/error/exception.jsp</location>
</error-page>
<error-page>
<exception-type>pl.app.MyException</exception-type>
<location>/WEB-INF/jsp/error/myException.jsp</location>
</error-page>
but every exception redirects to exception.jsp. Is it possible to do this and how? Any help appreciated
I believe that error-page is a configuration parameter related to the servlet container, not Spring. You should use an Exception resolver.
See Here for a good tutorial.