![](/img/trans.png)
[英]How to handle different authentication exceptions in Spring security 3.1?
[英]How to handle multiple error pages for different exceptions in Spring
我想我之前在某个地方看过它,但我找不到它。 我的问题是设置不同的错误页面,一个用于我的详细例外,例如。 pl.app.MyException和其他每个异常。 我的web.xml看起来像:
<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。 是否可以这样做以及如何做? 任何帮助赞赏
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.