Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.6
-
None
-
Patch
Description
This is a patch from Webwork.
Original Issue: http://jira.opensymphony.com/browse/WW-1404
Index: /projects/backup/webwork-trunk/src/java/com/opensymphony/webwork/interceptor/TokenSessionStoreInterceptor.java
===================================================================
— /projects/backup/webwork-trunk/src/java/com/opensymphony/webwork/interceptor/TokenSessionStoreInterceptor.java (revision 2855)
+++ /projects/backup/webwork-trunk/src/java/com/opensymphony/webwork/interceptor/TokenSessionStoreInterceptor.java (working copy)
@@ -4,6 +4,11 @@
*/
package com.opensymphony.webwork.interceptor;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import com.opensymphony.webwork.ServletActionContext;
import com.opensymphony.webwork.util.InvocationSessionStore;
import com.opensymphony.webwork.util.TokenHelper;
@@ -12,9 +17,6 @@
import com.opensymphony.xwork.Result;
import com.opensymphony.xwork.util.OgnlValueStack;
-import javax.servlet.http.HttpServletRequest;
-import java.util.Map;
-
/**
- <!-- START SNIPPET: description -->
@@ -94,6 +96,7 @@
ActionContext ac = invocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest) ac.get(ServletActionContext.HTTP_REQUEST);
+ HttpServletResponse response = (HttpServletResponse) ac.get(ServletActionContext.HTTP_RESPONSE);
String tokenName = TokenHelper.getTokenName();
String token = TokenHelper.getToken(tokenName);
@@ -110,8 +113,10 @@
Map context = stack.getContext();
request.setAttribute(ServletActionContext.WEBWORK_VALUESTACK_KEY, stack);
+ ActionContext savedContext = savedInvocation.getInvocationContext();
+ savedContext.getContextMap().put(ServletActionContext.HTTP_REQUEST, request);
+ savedContext.getContextMap().put(ServletActionContext.HTTP_RESPONSE, response);
Result result = savedInvocation.getResult();
-
if ((result != null) && (savedInvocation.getProxy().getExecuteResult())) {
synchronized (context) {
result.execute(savedInvocation);
Attachments
Issue Links
- is related to
-
WW-2736 Token session interceptor still firing Nullpointer exceptions under Internet Explorer 7
- Closed