You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Allistair Crossley <Al...@QAS.com> on 2005/06/24 15:38:01 UTC

[OT] Sharing session with manual jsessionid

Hi,

We are using embedded XML requests within out browser and I would like to share information through 1 session since these XML requests create new requests with their own sessions.

I am obtaining the outer session with session.getId and manually adding jsessionid=<%= session.getId() %> to the XML requests in the hope that the jsessionid will override the presence of cookies in the internal JSP that the XML request hits.

However, it does not, and the internal JSP generates another session id.

I don't think this can be helped can it?

Cheers, Allistair


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
-------------------------------------------------------
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
-------------------------------------------------------
</FONT>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: [OT] Sharing session with manual jsessionid

Posted by Jon Wingfield <jo...@mkodo.com>.
The jsessionid would have to be a path parameter not a url parameter 
(append prefixed with a semi-colon rather than a question mark).

There was a thread last week called "isRequestedSessionIdFromURL() 
returns false" which discussed what happens when the id is both in the 
url and a cookie: the cookie wins. You'll have to make sure the xml 
requests don't have the cookie header. (It sounds like that is the case 
as a new session is generated.)

HTH,

Jon

Allistair Crossley wrote:
> Hi,
> 
> We are using embedded XML requests within out browser and I would like to share information through 1 session since these XML requests create new requests with their own sessions.
> 
> I am obtaining the outer session with session.getId and manually adding jsessionid=<%= session.getId() %> to the XML requests in the hope that the jsessionid will override the presence of cookies in the internal JSP that the XML request hits.
> 
> However, it does not, and the internal JSP generates another session id.
> 
> I don't think this can be helped can it?
> 
> Cheers, Allistair
> 
> 
> <FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> 
> -------------------------------------------------------
> QAS Ltd.
> Registered in England: No 2582055
> Registered in Australia: No 082 851 474
> -------------------------------------------------------
> </FONT>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org