我想我以前在某處看過它,但找不到它。 我的問題是設置不同的錯誤頁面,例如我的詳細例外。 pl.app.MyException和另一個異常。 我的web.xml看起來像:如何處理Spring中的不同異常的多個錯誤頁面
<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>
但每個異常重定向到exception.jsp。是否有可能做到這一點,以及如何?任何幫助表示讚賞
你定義了一個ExceptionResolver嗎? – erimerturk 2012-04-13 08:12:53