Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.6
-
None
-
Patch
Description
This is a patch from webwork.
Original Description:
I'm trying to use the session token interceptor to prevent users from submitting the same form multiple times. It works but if I dispatch to a long JSP page I'm getting a Freemarker template error(see below). If I make the page very small it works perfectly, if I repeat the same content a few times(to make sure it's the length of the page and not the content which is generating the error) it gives the freemarker template error.
http://jira.opensymphony.com/browse/WW-1357
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 2795)
+++ /projects/backup/webwork-trunk/src/java/com/opensymphony/webwork/interceptor/TokenSessionStoreInterceptor.java (working copy)
@@ -107,6 +107,7 @@
if (savedInvocation != null) {
// set the valuestack to the request scope
OgnlValueStack stack = savedInvocation.getStack();
+ Map context = stack.getContext();
request.setAttribute(ServletActionContext.WEBWORK_VALUESTACK_KEY, stack);
Result result = savedInvocation.getResult();
@@ -112,7 +113,9 @@
Result result = savedInvocation.getResult();
if ((result != null) && (savedInvocation.getProxy().getExecuteResult())) {
- result.execute(savedInvocation);
+ synchronized (context) { + result.execute(savedInvocation); + }}
// turn off execution of this invocations result
Attachments
Issue Links
- is part of
-
WW-2902 Session token usage error: java.lang.IllegalStateException: Context has not been prepared for next connection
- Closed