logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: JSESSIONID/Cookie Problem in AbstractHttpConnector?: msg#00017

Subject: Re: JSESSIONID/Cookie Problem in AbstractHttpConnector?
Manoj,

thanks for reporting this one. Wouldn't have found it so fast myself. 
Though i not fully understand why this should have done any harm - 
nobody actually passed an unempty map to AbstractHttpConnector. Hm, 
anyway i hope this solves your problem. I checked the changes in so if 
you would please test again and let me know if the problem really has gone.

Joern


Tripathi, Manoj S wrote:
> Hi,
> I took the latest chiba-web and chiba-sandbox code from CVS yesterday. 
> Chiba is embedded into my web application and I use replace="instance" 
> to post the data from chiba to my web application.  The form displays 
> correctly but when once chiba submits the form instance to my 
> application it adds its own "JSESSIONID" cookie(the id is obtained from 
> XFormsSession). My web application already contains a "JSESSIONID" 
> cookie and because of multiple JSESSIONID cookie entries, the web 
> application doesn't recognize this post as part of an existing session( 
> a new session is returned from request.getSession). As a result of this 
> I loose the session data which is needed to complete the post process 
> and generate a new instance.
>  
> ChibaServlet has been modified considerably since the last time I used 
> it, but the code there seems ok.* If I comment the below lines in 
> AbstractHttpConnector.java then the web application is able to process 
> the post correctly and there is no loss of session data.* I compared the 
> AbstractHttpConnector code to previous versions and per my knowledge 
> this should not be a problem. The problem is probably in the way the 
> session id from XFormsSession is used or in ChibaServlet?
>  
> /protected void execute(HttpMethod httpMethod) throws Exception {/
> /..../
> // 
> /        *// *if (submissionMap != null) {
>         //     String sessionid = 
> submissionMap.get(ChibaAdapter.SESSION_ID).toString();
>         //     if (sessionid != null) {
>         //        HttpState state = client.getState();
>         //      state.setCookiePolicy(CookiePolicy.COMPATIBILITY);
>         //    state.addCookie(new Cookie(httpMethod.getURI().getHost(), 
> "JSESSIONID", sessionid, httpMethod.getPath(), null, false));
>         *//*  client.setState(state);/
> // 
> /        // }
>         // }/
> /}/
>  
> Please let me know if you have any thoughts, comments as to why this is 
> happening or the exact root cause of this...?
>  
> Thanks in advance,
> Manoj
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Chiba-developer mailing list
> Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/chiba-developer


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>