I need to figure out the time for which the user was logged-in on the site. This is straightforward when user logs out properly. However, when session is timed out automatically I need to compute the time accordingly. How can I add callback on session timeout in struts? I know session listener can be used in usual servlets, but not sure how can I have same functionality in the struts framework.