tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre-John Mas <aj...@sympatico.ca>
Subject Re: JSESSIONID cookie permanent?
Date Wed, 12 Aug 2009 23:46:24 GMT
The session data is stored on the server, so if the JSESSIONID lasted  
longer
than the session on the server, it would simply map to an expired  
session.
What would happen in this case is the server would have no session  
mapping
to that ID and simply allocate a new session, with a new JSESSIONID.

There are two ways to store your cart:

   - regular browse cookie, being sure to respect maximum storage
   - store it on the server

The last appraoch is the only way to ensure the user will have access
to the cart from another machine, though this will require a user  
account.

The regular browser cookie will allow you short term storage, but has
limited storage space and is only accessible from the computer the user
last visited yoru site with.

André-John

On 12-Aug-2009, at 14:52, Mitch Claborn wrote:

> I don't have any problem with the session contents (on the tomcat
> server).  I'm in a tomcat cluster and the sessions are replicated
> between members of the cluster.  As long as at least one member of the
> cluster is running, then the sessions survive.  I don't mind if the
> sessions on the server expire after a number of days. I'm just wanting
> the user to be able to keep his sessionid across browser sessions.
>
> Mitch
>
> Hassan Schroeder wrote:
>> On Wed, Aug 12, 2009 at 11:35 AM, Mitch Claborn<mitch@claborn.net>  
>> wrote:
>>
>>> My usage is:  I store the key to the user's shopping cart in the
>>> session.
>>>
>>
>> If I understand you correctly, then you would need to serialize the
>> session when it ended, to be able to resurrect it and retrieve that
>> key, or have never-expiring sessions (probably *not* a good idea).
>>
>>
>>> I'd like the user to be able to come back a few days from now
>>> and still find the items they have placed in their shopping cart.   
>>> (This
>>> is mostly for anonymous users who don't sign in until checkout.)
>>>
>>
>> Why can't you just save the cart key in a persistent cookie?
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Mime
View raw message