Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Servlet Interest »

Re: session timeout

Johan Hahn

2004-12-22

Replies:

> [snip] an user [snip]

Actually it's _a_ user, not an. The 'rule' is not whether the first character is a
vowel or a consonant, it's about whether it is pronounced as one. Hope you
didn't mind. It's just that I see this a lot and this time I had to say something.

[snip]
> Thanks for Johan Hahn's suggestion, I've solved my problem by using her
> solution.

Bhaaa! I'm actually a guy. Though I guess it's always good to know that your
name sounds like it belongs to a woman to at least a billion people*, right? :)

* assuming "Ming Li" is chinese

And since I sent my response to you privately, here it is for the rest of the list:

> The question is really about finding out if a request is made with no session id,
> or with an invalid session id. Since the HttpSession isn't created if the session
> is invalid we can't call getSession().getId() as it will only create a new session.
> We have to find out the invalid session id by other means.
>
> In practice, I think you could just check the query string for the substring
> "JSESSIONID" or check for a cookie with the same name. Mind you though
> that these are not the only ways a server is allowed to track sessions. But I
> don't think, after glancing through the API, that there is a completely server
> independant way to do it.

...johahn

___________________________________________________________________________
To unsubscribe, send email to listserv@(protected)
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
©2008 junlu.com - Jax Systems, LLC, U.S.A.