全局错误处理页面

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Double_Hill/article/details/68557183

<web-app>中添加

        <error-page>

              <error-code>500</error-code>

              <location>/common/500.jsp</location>

        </error-page>

        <error-page>

              <error-code>404</error-code>

              <location>/common/404.html</location>

        </error-page>


</web-app>




jsp的错误页面页面的 @page 指令 添加  isErrorPage = "true"   可以用内置的  exception对象    <%=exception.getMessage()%>

猜你喜欢

转载自blog.csdn.net/Double_Hill/article/details/68557183