I have an implementation of javax.servlet.http.HttpSessionListener that is supposed to detect user session invalidation/timeout in a Struts project.
The sessionDestroyed() never seems to be getting called, I can reproduce this by deleting my JSESSIONID and refreshing the page. I also find that leaving the browser open until the session times out has the same effect.
The site is running in JBoss 4.2.3.GA with Java 1.5.
I'm starting to suspect that HttpSessionListener does not do what I expect it to, am I missing something?
Edit :
My listener is registered in my web.xml as follows:
<listener>
<listener-class>com.domain.web.listener.LogoutListener</listener-class>
</listener>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…