404错误的捕获:
<struts>
<package name="default" extends="struts-default">
<default-action-ref name="error">
</default-action-ref>
<action name="testDispatcher" class="com.struts.action.TestDispatcher">
<result>/testDispatcher.jsp</result>
</action>
<action name="error">
<result>/error.jsp</result>
</action>
</package>
</struts>
500错误的捕获:
<struts>
<package name="default" extends="struts-default">
<global-results>
<result name="error500">/error500.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping result="error500" exception="java.lang.Exception"></exception-mapping>
</global-exception-mappings>
</package>
</struts>