struts2和web.xml异常页面处理
struts2和web.xml错误页面处理
title:struts2和web.xml错误页面处理
//web.xml
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/500.jsp</location>
</error-page>
<exception-type>java.IO.Exception</exception-type>
<location>/IOException.jsp</location>
</error-page>
//struts2
<package name="default" extends="struts-default">
<default-action-ref name="notFound" />
<action name="notFound">
<result>/struts2.jsp</result>
</action>
</package>