在使用web.xml中的error-page时候,
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
或
<error-page>
<exception-type>异常类型</exception-type>
<location>/error.jsp</location>
</error-page>
有时候error.jsp的内容显示不出来,老显示ie自己的错误页面。
最后终于发现,error.jsp的文件大小必须大于 602个字节!(个人测试结果)
这样error.jsp的内容才可以正确的显示.
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
或
<error-page>
<exception-type>异常类型</exception-type>
<location>/error.jsp</location>
</error-page>
有时候error.jsp的内容显示不出来,老显示ie自己的错误页面。
最后终于发现,error.jsp的文件大小必须大于 602个字节!(个人测试结果)
这样error.jsp的内容才可以正确的显示.