在struts.xml配置文件中:
<package name="default" namespace="/" extends="struts-default">
<default-action-ref name="defaultAction"></default-action-ref>
<action name="defaultAction">
<result>fail.jsp</result>
</action>
</package>
如果用servlet实现404跳转:
<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>