在xwork.xml文件中,这几个标签是有严格顺序的,正确顺序如下:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN" "xwork-1.0.dtd" >
<xwork>
<include file="webwork-default.xml"></include>
<package name="default" extends="webwork-default">
<result-types>
<result-type name="debug" class="ch7.example1.DebugResult" default="true"/>
</result-types>
<interceptors>
<interceptor name="authcheck" class="ch5.example1.AuthInterceptor"></interceptor>
</interceptors>
<default-interceptor-ref name="completeStack"></default-interceptor-ref>
<global-results>
<result name="login" type="redirect">/login!default.dhtml</result>
</global-results>
<action name="helloworld" class="ch2.example1.HelloWorld">
<result name="success">/ch2/result.jsp</result>
</action>
</package>