<error-page>
<error-code>404</error-code>
<location>/error_404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error_500.jsp</location>
</error-page>2.配置<error-page>讓Web容器捕獲如下異常:
<1>RuntimeException或Error
<2>ServletException或它的子類
<3>IOException或它的子類
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/error.jsp</location>
</error-page>