屏蔽jsp页面错误

屏蔽jsp页面异常在web.xml进行如下配置,即可在页面出现异常转向相应页面error-pageerror-code404/err

屏蔽jsp页面异常
在web.xml进行如下配置,即可在页面出现异常转向相应页面
<error-page>
      <error-code>404</error-code>
       <location>/error.jsp</location>
</error-page>
<error-page>
      <error-code>500</error-code>
      <location>/error.jsp</location>
</error-page>
<error-page>
       <error-code>503</error-code>
       <location>/error.jsp</location>
</error-page>