Commits

rainerh  committed 4519994

Need way to specify empty stacko patch applied
o applied suggested fix.
o added emptyStack to xwork-default.xml
o updated some test config file DTD mappings
NOTE: Since the patch is fully backwards compliant, there shouldn't be an issue for existing applications.

Issue Number: XW-496

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1420e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits cb50f41

Comments (0)

Files changed (4)

File src/java/xwork-2.0.dtd

     class CDATA #REQUIRED
 >
 
-<!ELEMENT interceptor-stack (interceptor-ref+)>
+<!ELEMENT interceptor-stack (interceptor-ref*)>
 <!ATTLIST interceptor-stack
     name CDATA #REQUIRED
 >

File src/java/xwork-default.xml

 
 <xwork>
 
-    <bean class="com.opensymphony.xwork2.ObjectFactory"  />
-    <bean type="com.opensymphony.xwork2.ActionProxyFactory"  
+    <bean class="com.opensymphony.xwork2.ObjectFactory"/>
+    <bean type="com.opensymphony.xwork2.ActionProxyFactory"
           class="com.opensymphony.xwork2.DefaultActionProxyFactory"/>
-    <bean type="com.opensymphony.xwork2.util.ObjectTypeDeterminer"  
+    <bean type="com.opensymphony.xwork2.util.ObjectTypeDeterminer"
           class="com.opensymphony.xwork2.util.GenericsObjectTypeDeterminer"/>
-    <bean name="xwork1" 
-          type="com.opensymphony.xwork2.util.ObjectTypeDeterminer"  
+    <bean name="xwork1"
+          type="com.opensymphony.xwork2.util.ObjectTypeDeterminer"
           class="com.opensymphony.xwork2.util.DefaultObjectTypeDeterminer"/>
-    <bean name="xwork1" 
-          type="com.opensymphony.xwork2.util.XWorkConverter"  
-          class="com.opensymphony.xwork2.util.XWorkConverter" />    
-    <bean type="com.opensymphony.xwork2.util.XWorkConverter" 
-          class="com.opensymphony.xwork2.util.AnnotationXWorkConverter" />
+    <bean name="xwork1"
+          type="com.opensymphony.xwork2.util.XWorkConverter"
+          class="com.opensymphony.xwork2.util.XWorkConverter"/>
+    <bean type="com.opensymphony.xwork2.util.XWorkConverter"
+          class="com.opensymphony.xwork2.util.AnnotationXWorkConverter"/>
 
     <!--  static injections -->
-    <bean class="com.opensymphony.xwork2.util.OgnlValueStack" static="true" />
-    <bean class="com.opensymphony.xwork2.util.XWorkConverter" static="true" />
-    
+    <bean class="com.opensymphony.xwork2.util.OgnlValueStack" static="true"/>
+    <bean class="com.opensymphony.xwork2.util.XWorkConverter" static="true"/>
+
     <package name="xwork-default">
-    	
-    	<!-- START SNIPPET: xwork2-default-result-types -->
+
+        <!-- START SNIPPET: xwork2-default-result-types -->
         <result-types>
             <result-type name="chain" class="com.opensymphony.xwork2.ActionChainResult"/>
         </result-types>
 
-		<!-- END SNIPPET: xwork2-default-result-types -->
+        <!-- END SNIPPET: xwork2-default-result-types -->
 
         <interceptors>
             <!-- START SNIPPET: xwork2-default-interceptors -->
-        
+
             <interceptor name="timer" class="com.opensymphony.xwork2.interceptor.TimerInterceptor"/>
             <interceptor name="logger" class="com.opensymphony.xwork2.interceptor.LoggingInterceptor"/>
             <interceptor name="chain" class="com.opensymphony.xwork2.interceptor.ChainingInterceptor"/>
             <interceptor name="filter-params" class="com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor"/>
             <interceptor name="remove-params" class="com.opensymphony.xwork2.interceptor.ParameterRemoverInterceptor"/>
             <interceptor name="model-driven" class="com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor"/>
-            <interceptor name="scoped-model-driven" class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"/>
+            <interceptor name="scoped-model-driven"
+                         class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"/>
             <interceptor name="validation" class="com.opensymphony.xwork2.validator.ValidationInterceptor"/>
             <interceptor name="workflow" class="com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor"/>
             <interceptor name="prepare" class="com.opensymphony.xwork2.interceptor.PrepareInterceptor"/>
-            <interceptor name="conversionError"  class="com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor"/>
-	    <interceptor name="alias" class="com.opensymphony.xwork2.interceptor.AliasInterceptor"/>
-	    <interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
-	    <interceptor name="i18n" class="com.opensymphony.xwork2.interceptor.I18nInterceptor"/>
-  
-  	    <!-- END SNIPPET: xwork2-default-interceptors -->
-  
-  
-  	    <!-- START SNIPPET: xwork2-default-interceptor-stack -->
-  
+            <interceptor name="conversionError" class="com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor"/>
+            <interceptor name="alias" class="com.opensymphony.xwork2.interceptor.AliasInterceptor"/>
+            <interceptor name="exception" class="com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
+            <interceptor name="i18n" class="com.opensymphony.xwork2.interceptor.I18nInterceptor"/>
+
+            <!-- END SNIPPET: xwork2-default-interceptors -->
+
+
+            <!-- START SNIPPET: xwork2-default-interceptor-stack -->
+
+            <interceptor-stack name="emptyStack"/>
+
             <interceptor-stack name="defaultStack">
                 <interceptor-ref name="static-params"/>
                 <interceptor-ref name="params"/>
                 <interceptor-ref name="validation"/>
                 <interceptor-ref name="workflow"/>
             </interceptor-stack>
-            
+
             <!-- END SNIPPET: xwork2-default-interceptor-stack -->
-            
+
         </interceptors>
-        
-        <default-class-ref class="com.opensymphony.xwork2.ActionSupport" />
-        
+
+        <default-class-ref class="com.opensymphony.xwork2.ActionSupport"/>
+
     </package>
 </xwork>

File src/test/xwork-sample.xml

 <!DOCTYPE xwork PUBLIC
-    "-//OpenSymphony Group//XWork 1.1.1//EN"
-    "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd"
+    "-//OpenSymphony Group//XWork 2.0//EN"
+    "http://www.opensymphony.com/xwork/xwork-2.0.dtd"
  >
  <!-- "file:///temp/ross/xwork/src/etc/xwork-1.0.dtd"  -->
 

File src/test/xwork-test-default.xml

 <!DOCTYPE xwork PUBLIC
-    "-//OpenSymphony Group//XWork 1.1.1//EN"
-    "http://www.opensymphony.com/xwork/xwork-1.1.1.dtd"
+    "-//OpenSymphony Group//XWork 2.0//EN"
+    "http://www.opensymphony.com/xwork/xwork-2.0.dtd"
  >
 
 <xwork>