設置
<error-page>
<error-code>401</error-code>
<location>/errorpage/401.jsp</location>
</error-page>
<error-page>
<error-code>403</error-code>
<location>/errorpage/403.jsp</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/errorpage/500.htm</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/errorpage/500.htm</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/errorpage/500.htm</location>
</error-page>
上面是我的WEB.XML文件的配置
當錯誤代碼為404時可以成功的到指定的頁面,
當系統有java類異常時無法到指定的頁面,java.lang.Exception是所有異常類的超類,就包括了所有的異常類,
所以只要有異常出現應該都會到/errorpage/500.htm,
請問我的分析正確嗎,
請指教!