This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I want to reset my session timeout time back to 20 minutes each time the user sends a new request, 'm using struts 2.0, i have defined session timeout in web.xml as 20 minutes, so whatever the user does, he is logged out after 20 minutes, i have also set maxInactiveInterval as 20 minutes in the session listener, still its not taking the last accessed time but taking the session creation time and application times out after 20 minutes. what to do ?? THANKS IN ADVANCE FOR HELP. !!
i am using Geronimo 2.0 server. [ September 10, 2008: Message edited by: Robin John ]
Time is what we want the most, but what we use the worst. -- William Penn
Author and all-around good cowpoke
Joined: Mar 22, 2000
If your servlet container is not reseting the last accessed time every time a request comes in then it is not implementing the servlet API correctly. Geronimo 2.0 claims to be "fully certified Java EE 5 application server runtime."
Since this is a function that practically every complex servlet application depends on working correctly, it seems reasonable to me that something else is going on to invalidate your sessions. If it really is Geronimo's fault, you have discovered a serious bug.
All you do (as William has said) is set the session-timeout. The servlet container will do the rest. If it is not I'd send your test case to the Geronimo people. But I would be surprised if it were Geronimo's fault - this is a fairly key requirement of Servlet containers.