Re: [JBoss-user] http session cookie

2003-04-02 Thread Anders Engström
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 |
|===|





pgp0.pgp
Description: PGP signature


[JBoss-user] http session cookie

2003-04-02 Thread julien viet
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.

julien.



---
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user