Web服务器中error-page配置无效的解决方法

来源:互联网 发布:暴雪影视知乎 编辑:程序博客网 时间:2024/05/20 09:06

在web.xml中配置的<error-page></error-page>不起作用,没有跳转到我想要的界面

<error-page><error-code>404</error-code><location>/error.jsp</location></error-page>

请教了各种方法:

1.确保location属性中填写的错误页面是绝对路径
2.确保error.jsp的大小>1024字节(大部分都是因为这个,之前我还不信,一试才知道,我擦)
3.确保在error.jsp页面中添加<%@ page isErrorPage="true"%>


1 0
原创粉丝点击