struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hus...@apache.org
Subject svn commit: r612104 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
Date Tue, 15 Jan 2008 12:41:15 GMT
Author: husted
Date: Tue Jan 15 04:41:14 2008
New Revision: 612104

URL: http://svn.apache.org/viewvc?rev=612104&view=rev
Log:
WW-1741 make ExecuteAndWaitInterceptor token aware - Apply patch provided by Thomas Micheline.

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java?rev=612104&r1=612103&r2=612104&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
Tue Jan 15 04:41:14 2008
@@ -30,6 +30,7 @@
 import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.struts2.util.TokenHelper;
 
 
 /**
@@ -195,13 +196,13 @@
     /**
      * Returns the name to associate the background process.  Override to change the way
background processes
      * are mapped to requests.
-     * 
+     *
      * @return the name of the background thread
      */
     protected String getBackgroundProcessName(ActionProxy proxy) {
         return proxy.getActionName();
     }
-    
+
     /* (non-Javadoc)
      * @see com.opensymphony.xwork2.interceptor.MethodFilterInterceptor#doIntercept(com.opensymphony.xwork2.ActionInvocation)
      */
@@ -246,6 +247,10 @@
                             .addParams(Collections.singletonMap("location", "/org/apache/struts2/interceptor/wait.ftl"))
                             .build();
                     results.put(WAIT, rc);
+                }
+
+                if (TokenHelper.getToken() != null) {
+                    session.put(TokenHelper.getTokenName(), TokenHelper.getToken());
                 }
 
                 return WAIT;



Mime
View raw message