日期:2014-05-18  浏览次数:20612 次

请教: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支持呀!!!