You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "aditya.barimar@asia.bnpparibas.com (JIRA)" <ji...@apache.org> on 2007/09/07 10:50:35 UTC

[jira] Commented: (WW-1787) Token session interceptor faiing with redirect-action

    [ https://issues.apache.org/struts/browse/WW-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_42151 ] 

aditya.barimar@asia.bnpparibas.com commented on WW-1787:
--------------------------------------------------------

Hi,

I am trying to use the tokensessionstoreinterceptor but on the second 
click i always get the error:

"[opensymphony.webwork.dispatcher.DispatcherUtils] Could not execute 
action
EOFException(java.net.SocketException: Connection reset by peer: socket 
write error)"

Could you tell me why this happens?

Any hlp/pointers appreciated! 

Many thanks!

Cheers,
Aditya.
This message and any attachments (the "message") is intended solely for the addressees and is confidential. 
If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with 
its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. 
The internet can not guarantee the integrity of this message. 
BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. 
Do not print this message unless it is necessary, consider the environment.
                ---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce 
message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. 
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse.
L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie.
N'imprimez ce message que si necessaire, pensez a l'environnement.


> Token session interceptor faiing with redirect-action
> -----------------------------------------------------
>
>                 Key: WW-1787
>                 URL: https://issues.apache.org/struts/browse/WW-1787
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Interceptors
>    Affects Versions: 2.0.6
>            Reporter: Tom Schneider
>            Assignee: Ted Husted
>            Priority: Minor
>             Fix For: 2.0.7, 2.1.0
>
>
> 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);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.