You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kumar M <ku...@netscape.net> on 2004/03/30 23:17:42 UTC

Session Time Out

Hi all,

I am setting the web application to time out in 60 mins. After that if 
the user sends a request from the expired browser session I was hoping 
to identify that state using "request.getSession(false) == null" in my 
Action Servlet.

But I am noticing that "request.getSession(false)" is never null. When I 
looked carefully at the other attributes on Session, I noticed that the 
"isNew" attribute is set to true. According to the API, 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getSession(boolean), 
request.getSession(false)  should return null when there is no session 
in progress for that request. I am wondering if the web server creates a 
session if there is not one associated with this request.

Could some one confirm if this is true? I am using JDK 1.3 and Weblogic 6.1

Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Session Time Out

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Hi Kumar,
struts will create the session. AFAIK there is no way to disable it in 
struts.

Adam

On 03/30/2004 11:17 PM Kumar M wrote:
> 
> I am setting the web application to time out in 60 mins. After that if 
> the user sends a request from the expired browser session I was hoping 
> to identify that state using "request.getSession(false) == null" in my 
> Action Servlet.
> 
> But I am noticing that "request.getSession(false)" is never null. When I 
> looked carefully at the other attributes on Session, I noticed that the 
> "isNew" attribute is set to true. According to the API, 
> http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html#getSession(boolean), 
> request.getSession(false)  should return null when there is no session 
> in progress for that request. I am wondering if the web server creates a 
> session if there is not one associated with this request.
> 
> Could some one confirm if this is true? I am using JDK 1.3 and Weblogic 6.1
> 
> Thanks!
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org