tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Souther <>
Subject RE: How to detect expired session vs. no session?
Date Wed, 08 Dec 2004 09:52:16 GMT
> > if you call request.getSession(false) this will return null if the
> > request is not associated with a request already.  the "false" param
> > turns off the default behaviour of creating a new session when none
> > exists.

On Wed, 2004-12-08 at 04:35, LAM Kwun Wa Joseph wrote:
> But does it have the same effect for a request with an expired session vs
> a request with no session at all? I think it will return null in both
> cases.

How about reading the request headers to see if there is a jspsessionid?

If a sessionid exists and getSession(false) returns null, you have an
expired session.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message