You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Lionel Pieniazek (JIRA)" <ji...@apache.org> on 2007/02/19 18:05:05 UTC

[jira] Commented: (AXIS2-2062) Session Management Problem whe use the WAR distribution on Tomcat or similar.

    [ https://issues.apache.org/jira/browse/AXIS2-2062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474229 ] 

Lionel Pieniazek commented on AXIS2-2062:
-----------------------------------------

The last Snapshot Works. OK.

But maybe you have to change the HTTPSender.java to support both type of cookies. The Constants.SESSION_COOKIE and Constants.SESSION_COOKIE_JSESSIONID.
This is the correct code.

        Object cookieString = msgContext.getProperty(HTTPConstants.COOKIE_STRING);
        if (cookieString != null) {
            StringBuffer buffer = new StringBuffer();
            buffer.append(Constants.SESSION_COOKIE);
            buffer.append("=");
            buffer.append(cookieString);
            buffer.append(";");
            buffer.append(Constants.SESSION_COOKIE_JSESSIONID);
            buffer.append("=");
            buffer.append(cookieString);
            postMethod.setRequestHeader(HTTPConstants.HEADER_COOKIE, buffer.toString());
        }

Lionel


> Session Management Problem whe use the WAR distribution on Tomcat or similar.
> -----------------------------------------------------------------------------
>
>                 Key: AXIS2-2062
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2062
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: client-api, kernel
>            Reporter: Lionel Pieniazek
>         Assigned To: Deepal Jayasinghe
>         Attachments: AbstractHTTPSender.java, Constants.java, SOAPOverHTTPSender.java
>
>
> There is a bug when use the WAR distribution over Tomcat or similar. The way that the server manage the session it's not using the "axis_session" cookie. Tomcat or similar uses "JSESSIONID" cookie for session. 
> When the SOAPOverHTTPSender send back the Cookie to the client it puts the wrong name to it.
>         //setting the cookie in the out path
>         Object cookieString = msgContext.getProperty(HTTPConstants.COOKIE_STRING);
>         if (cookieString != null) {
>             StringBuffer buffer = new StringBuffer();
>             buffer.append(Constants.SESSION_COOKIE); ###### Look at this LINE #########
>             buffer.append("=");
>             buffer.append(cookieString);
>             postMethod.setRequestHeader(HTTPConstants.HEADER_COOKIE, buffer.toString());
>         }
> If you change that line with "buffer.append("JSESSIONID"); " everithing works OK.
> That a look at http://issues.apache.org/jira/browse/AXIS2-2042 to use a good example to try it.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org