On Wed, Apr 02, 2003 at 03:14:41PM +0200, julien viet wrote:
> Hi,
> 
> I am facing this problem :
> 
> when an anonymous user connect to the web site and get its session.
> This one is persisted through a Cookie (JSESSIONID) with a maxage
> of -1.
> 
> on subsequent calls if I want to change this maxage to another
> value let's say 1000 for instance, it does not work and
> the JSESSIONID cookie stays the same.
> 
> the goal is to implement the "remember me" feature
> on the web site.
> 
> I've noticed that when maxage not -1, the cookie is shared
> by mutliple instance of Internet Explorer. That's why
> I want to use that.
> 
> I know I can set the default value used by jetty by setting
> org.mortbay.jetty.servlet.MaxAge in context param but
> in that case I will have only the other effect.
> 

JSESSIONID (HttpSession) is a "session only" cookie. It will go away
when the user closes the browser.

If you need persistent cookies (for a "remember me" feature ) you 
should use the javax.servlet.http.Cookie class (see the JavaDoc for
further info).

//Anders


-- 
|===================================|
|    Anders Engström                |
|    [EMAIL PROTECTED]            |
|    http://www.gnejs.net           |
|===================================|
|Your mind is like an umbrella.     |
|It doesn't work unless you open it.|
|  /Frank Zappa                     |
|===================================|



Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to