首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

请问:500异常的统一跳转

2012-03-08 
请教:500错误的统一跳转jsp网页通常会报500错误,为了界面的友好性,请教大家帮我弄个好的解决方法.谢谢tomc

请教:500错误的统一跳转
jsp网页通常会报500错误,
为了界面的友好性,请教大家帮我弄个好的解决方法.谢谢
tomcat好象有这个web.xml配置
不知道weblogic里有不?是怎样的,请举例,谢谢.
最好详细点

[解决办法]
如果是tomcat可以在web.xml中加入以下配置,weblogic没试过。
<error-page>
<error-code> 404 </error-code>
<location> error.html </location>
</error-page>
<error-page>
<error-code> 500 </error-code>
<location> error.html </location>
</error-page>
<error-page>
<exception-type> java.lang.NumberFormatException </exception-type>
<location> error.html </location>
</error-page>
<error-page>
<exception-type> java.lang.NoClassDefFoundError </exception-type>
<location> error.html </location>
</error-page>
<error-page>
<exception-type> java.lang.ClassNotFoundException </exception-type>
<location> error.html </location>
</error-page>
<error-page>
<exception-type> java.lang.NullPointerException </exception-type>
<location> error.html </location>
</error-page>
<error-page>
<exception-type> java.lang.IndexOutOfBoundsException </exception-type>
<location> error.html </location>
</error-page>

[解决办法]
weblogic没用过 不知道 给你顶一下
[解决办法]
<error-page>
<error-code> 404 </error-code>
<location> /error.jsp </location>
</error-page>
我用weblogic8.1支持呀!!!

热点排行