web.xml error-page 不起作用解决方案

本文解决了web.xml中配置的500错误跳转至500.jsp页面不生效的问题。解决方案包括:调整IE浏览器设置、确保错误页面大小超过1024字节及在500.jsp中正确声明错误页面。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[size=medium]调试错误跳转页面出现一个问题,即在web.xml中配置的<error-page></error-page>不起作用,在web.xml中配置代码如下:

<!-- <error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
-->
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/500.jsp</location>
</error-page>

此段代码为页面发生500错误时的跳转规则,解决不能显示的方案如下:

1.在IE【工具】->【Internet选项】->【高级】中勾掉【显示友好http错误提示】
2.确保error.jsp的大小>1024字节
3.确保在500.jsp页面中添加<%@ page isErrorPage="true"%>[/size]
]. The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.> <Mar 17, 2025 5:13:50,408 PM CST> <Warning> <HTTP> <BEA-101403> <For security constraint with url-pattern /* in web application rtgsMOP.war, only the http methods "TRACE HEAD PURGE LOCK PROPFIND UNLINK COPY OPTIONS VIEW PUT PATCH DELETE LINK UNLOCK " are covered.> <Mar 17, 2025 5:13:51,500 PM CST> <Warning> <HTTP> <BEA-101403> <For security constraint with url-pattern /* in web application bankMOP.war, only the http methods "TRACE HEAD PURGE LOCK PROPFIND UNLINK COPY OPTIONS VIEW PUT PATCH DELETE LINK UNLOCK " are covered.> <Mar 17, 2025 5:13:52,098 PM CST> <Critical> <HTTP> <BEA-101024> <[ServletContext@1374383048[app:bankMOP module:bankMOP.war path:null spec-version:4.0]] Unsupported error status code for the error-page element in web.xml. java.lang.ArrayIndexOutOfBoundsException: -99 at weblogic.servlet.internal.ErrorManager.registerError(ErrorManager.java:51) at weblogic.servlet.internal.ErrorManager.registerErrorPages(ErrorManager.java:87) at weblogic.servlet.internal.WebAppServletContext.activateFromDescriptors(WebAppServletContext.java:1199) at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3241) at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1879) Truncated. > <Mar 17, 2025 5:13:52,099 PM CST> <Critical> <HTTP> <BEA-101024> <[ServletContext@1150367507[app:rtgsMOP module:rtgsMOP.war path:null spec-version:4.0]] Unsupported error status code for the error-page element in web.xml. java.lang.ArrayIndexOutOfBoundsException: -99 at weblogic.servlet.internal.ErrorManager.registerError(ErrorManager.java:51) at weblogic.servlet.internal.ErrorManager.registerErrorPages(ErrorManager.java:87) at weblogic.servlet.internal.WebAppServletContext.activateFromDescriptors(WebAppServletContext.java:1199) at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3241) at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1879) Truncated. > <Mar 17, 2025 5:13:53,098 PM CST> <Warning> <HTTP> <BEA-101403> <For security constraint with url-pattern /* in web application rtgsMOP.war, only the http methods "TRACE HEAD PURGE LOCK PROPFIND UNLINK COPY OPTIONS VIEW PUT PATCH DELETE LINK UNLOCK " are covered.> <Mar 17, 2025 5:13:53,157 PM CST> <Warning> <HTTP> <BEA-101403> <For security constraint with url-pattern /* in web application bankMOP.war, only the http methods "TRACE HEAD PURGE LOCK PROPFIND UNLINK COPY OPTIONS VIEW PUT PATCH DELETE LINK UNLOCK " are covered.> 帮我分析一下这个weblogic server 启动日志
03-18
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值