web.xml中配置error-page
2016-08-29 11:39
465 查看
在web.xml中有两种配置error-page的方法,分别举例如下:
一. 通过错误码来配置error-page
上面配置了当系统发生500错误(即服务器内部错误)时,跳转到错误处理页面error.jsp。
二. 通过异常的类型配置error-page
上面配置了当系统发生java.lang.NullException(即空指针异常)时,跳转到错误处理页面error.jsp
一. 通过错误码来配置error-page
<error-page> <error-code>500</error-code> <location>/error.jsp</location> </error-page>
上面配置了当系统发生500错误(即服务器内部错误)时,跳转到错误处理页面error.jsp。
二. 通过异常的类型配置error-page
<error-page> <exception-type>java.lang.NullException</exception-type> <location>/error.jsp</location> </error-page>
上面配置了当系统发生java.lang.NullException(即空指针异常)时,跳转到错误处理页面error.jsp
相关文章推荐
- SSM中web.xml中配置错误页面时<error-page> ()报错
- web.xml中两种配置error-page的方法
- 在web.xml中配置error-page
- Jsp中errorPage使用及web.xml配置
- JavaEE在web.xml中实现错误页面配置(error page)
- 在web.xml中配置error-page
- web.xml配置error-page在IE下不起作用
- web.xml中配置<error-page>标签
- 在 web.xml中配置error-page(错误重定向)
- java web 在web.xml中配置error-page
- 关于web.xml配置error-page或者springmvc添加自定义异常返回画面,画面没有显示
- web.xml 中配置了error-page但不起作用问题
- 在tomcat的web.xml文件中配置error-page
- web.xml中配置<error-page>标签不起作用的问题
- web.xml 配置了 error-page 不能跳转到指定页面
- web.xml配置error-page,IE不显示配置页面
- 在web.xml中配置error-page
- WEB.XML error-page 配置错误页面
- 在web.xml中配置error-page
- web.xml中配置<error-page>标签不起作用的问题