> > 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
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
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
> -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
> &
:[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
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
: '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
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
> 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
> 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
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'
&
; 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
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() ||
13 matches
Mail list logo