RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Steve Kirk
> > In the last of these 4 cases, do you mean that the implicit > > JSP session > > object returns null, or that request.getSession(false) > > returns null? I > > could understand the first behaviour but would be surprised > > by the second. actually forget I said that, I made a mistake, getS

Re: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Andre Van Klaveren
The behavior of getSession(false) also depends on whether you're calling it from within a standard Servlet or calling it from the Request passed to a Stuts Action. getSession(false) always returns null if a valid session is not associated with the current request (whether or not the client sent a

Re: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Joseph Lam
Steve Kirk wrote: By default: 1. getSession(true)!=null 2. getSession(false)!=null But if a JSP page contains the tag <%@ page session="false" %>, then: 1. getSession(true)!=null 2. getSession(false)==null In the last of these 4 cases, do you mean that the implicit JSP session object returns n

RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Steve Kirk
> -Original Message- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: December 9, 2004 4:36 PM > To: 'Tomcat Users List' > Subject: RE: How to detect expired session vs. no session? (Solved) > > > > By default: > > 1. getSession(true)!=null > &

RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Ben Souther
:[EMAIL PROTECTED] > Sent: December 10, 2004 10:19 AM > To: Tomcat Users List > Subject: RE: How to detect expired session vs. no session? (Solved) > > > I believe it's because they were trying to figure out whether they had a new > session because the old one expired or bec

RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Phillip Qin
Yeah, that's my point. -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: December 10, 2004 10:19 AM To: Tomcat Users List Subject: RE: How to detect expired session vs. no session? (Solved) I believe it's because they were trying to figure out whether they

RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Ben Souther
: 'Tomcat Users List' > Subject: RE: How to detect expired session vs. no session? (Solved) > > > > By default: > > 1. getSession(true)!=null > > 2. getSession(false)!=null > > > > But if a JSP page contains the tag <%@ page session="false

RE: How to detect expired session vs. no session? (Solved)

2004-12-10 Thread Phillip Qin
Users List' Subject: RE: How to detect expired session vs. no session? (Solved) > By default: > 1. getSession(true)!=null > 2. getSession(false)!=null > > But if a JSP page contains the tag <%@ page session="false" %>, then: > 1. getSession(true)!=null 2

RE: How to detect expired session vs. no session? (Solved)

2004-12-09 Thread Steve Kirk
> By default: > 1. getSession(true)!=null > 2. getSession(false)!=null > > But if a JSP page contains the tag <%@ page session="false" %>, then: > 1. getSession(true)!=null > 2. getSession(false)==null In the last of these 4 cases, do you mean that the implicit JSP session object returns null, or

RE: How to detect expired session vs. no session? (Solved)

2004-12-08 Thread LAM Kwun Wa Joseph
> String id = request.getRequestedSessionId(); > if (null==id) > { > // there was no jsessionid in the request > } > else if (request.isRequestedSessionIdValid()) > { > // there was a valid jsessionid in the request > } > else > { > // there was an invalid jsessionid in the reques

RE: How to detect expired session vs. no session? (Solved)

2004-12-08 Thread Steve Kirk
valid, so TC will replace the jsessionid at that point. Hope this is useful to someone else and isn't too far off the mark...? > -Original Message- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday 08 December 2004 16:25 > To: 'Tomcat Users List' &

RE: How to detect expired session vs. no session? (Solved)

2004-12-08 Thread Steve Kirk
; From: LAM Kwun Wa Joseph [mailto:[EMAIL PROTECTED] > Sent: Wednesday 08 December 2004 11:23 > To: [EMAIL PROTECTED] > Subject: RE: How to detect expired session vs. no session? (Solved) > > > Confirmed that request.getSession(false)==null for both > expired session &g

RE: How to detect expired session vs. no session? (Solved)

2004-12-08 Thread LAM Kwun Wa Joseph
Confirmed that request.getSession(false)==null for both expired session requests and anonymous requests, if I have <%@ page session="false" %> in my pages. I just figured out the follow which work exactly what I wanted: boolean hasSessionID = (request.isRequestedSessionIdFromURL() ||