web.xml配置
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>解决办法
1、确保error.jsp的大小>1024字节;
2、在IE【工具】->【Internet选项】->【高级】中勾掉【显示友好http错误提示】。
本文详细介绍了如何通过web.xml文件配置错误页面,并提供了确保error.jsp大小超过1024字节和关闭IE友好HTTP错误提示的方法来解决常见的404错误问题。
web.xml配置
<error-page>
<error-code>404</error-code>
<location>/error.html</location>
</error-page>1、确保error.jsp的大小>1024字节;
2、在IE【工具】->【Internet选项】->【高级】中勾掉【显示友好http错误提示】。
9177

被折叠的 条评论
为什么被折叠?
