mytilig
asked on
Session Timeout issue
I want to set my session timeout to 8 hours. I am using SunOne webserver.
In my JSP, I have session.setMaxInactiveInte rval(60*60 *8);
But my session seems to get timed out in less than 30 minutes.
I tried to print session.getMaxInactiveInte rval and it does print 28800(60*60*8) but for some reason session gets invalidated in about 30 minutes. any thoughts?
Thanks.
In my JSP, I have session.setMaxInactiveInte
But my session seems to get timed out in less than 30 minutes.
I tried to print session.getMaxInactiveInte
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have removed the session.setMaxInactiveInte rval(60*60 *8); from my code and added this to my web.xml
<session-config>
<session-timeout>720 </session-timeout>
</session-config>
(I want the session to time out after 12 hours.)
The application still seems to be getting timed out after the 1st hour before the 2nd hour. I print session.getMaxInactiveInte rval() in my main JSP page, and it prints 43200 (720*60), so I am inclined to believe it is reading web.xml correctly.
Wondering why it still times out quickly?
Thanks.
<session-config>
<session-timeout>720 </session-timeout>
</session-config>
(I want the session to time out after 12 hours.)
The application still seems to be getting timed out after the 1st hour before the 2nd hour. I print session.getMaxInactiveInte
Wondering why it still times out quickly?
Thanks.
How are you measuring session timeout interval?
Seems there might be bug in few of the web servers.
Refer:
http://www.jguru.com/faq/view.jsp?EID=525564
Seems there might be bug in few of the web servers.
Refer:
http://www.jguru.com/faq/view.jsp?EID=525564
ASKER
I have sunone 6.1 webserver. The doc says timeout should be given in minutes within web.xml
When I specify it as 720 and execute my code to print sessiontimeout, it prints 43200 (720*60)
Thank you.
When I specify it as 720 and execute my code to print sessiontimeout, it prints 43200 (720*60)
Thank you.
<session-config>
<session-timeout>480</sess
</session-config>
Here the value of session-timeout tag is timeout for a session in minutes.