读书人

异常页面跳转解决方法

发布时间: 2012-10-24 14:15:58 作者: rapoo

错误页面跳转解决办法

在web.xml中配置错误页面跳转如下:
? <error-page>
??? <exception-type>java.lang.Exception</exception-type>
??? <location>/error.html</location>
? </error-page>

? <!-- 页面不存在时跳转-->
? <error-page>
??? <error-code>500</error-code>
??? <location>/error.html</location>
? </error-page>
?
? <error-page>
??? <error-code>404</error-code>
??? <location>/error.html</location>
? </error-page>

读书人网 >编程

热点推荐