We have discussed this issue before, and after looking through the new
Servlet 2.3 API, I still dont see any changes with regards to checking the time stamp of a session to determine if the session has expired. The method getLastAccessedTime() returns the last time in which the client sent a request associated with the session. This number is always equal to the current time, which, for the most part, is useless. But if you think about it, you actually want the *second* to last time the client sent a request with the session because knowing this information allows you to quickly calculate the difference in time between the current time and the second to last time the client accessed the session.
Is there an easy way to do this? I was thinking about storing a value in the session called "lastAccessedTime" and assigning it a value equal to the second to last time the client accessed the session. Then, upon getting the session from the request, I can subtract this value from the current time and compare it to a predetermined number that represents the maximum number of millisseconds a session is allowed to exist before it is marked as "expired."
I'm using Weblogic 6.1, and I'm new to it, but I'm willing to bet that Weblogic makes this problem much easier.
Any help would be appreciated, thanks,
SAF