You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Joao Batistella <jo...@ptinovacao.pt> on 2004/03/18 21:38:11 UTC

[Off-topic] How to invalidate a session when a context is destroy ed?

Hello. Sorry for the off topic question. 

I'm using Tomcat and all sessions that I have when the server is up are not
destroyed when I shutdown te server. I implemented a ServletContextListener
to register when the app is going down and a HttpSessionListener to see when
a session is destroyed.
For me, Tomcat should destroy all sessions when the server goes down. Is
this correct? Is there a way in the ServletContextListener to destroy all
active sessions? I couldn't find a way with ServletContext object I have in
the method contextDestroyed of my ServletContextListener.

Thanks,
JP

Re: [Off-topic] How to invalidate a session when a context is destroyed?

Posted by Max Cooper <ma...@maxcooper.com>.
I would look for a server setting before I wrote code to solve the problem.

-Max

----- Original Message ----- 
From: "Joao Batistella" <jo...@ptinovacao.pt>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, March 18, 2004 12:38 PM
Subject: [Off-topic] How to invalidate a session when a context is
destroyed?


> Hello. Sorry for the off topic question.
>
> I'm using Tomcat and all sessions that I have when the server is up are
not
> destroyed when I shutdown te server. I implemented a
ServletContextListener
> to register when the app is going down and a HttpSessionListener to see
when
> a session is destroyed.
> For me, Tomcat should destroy all sessions when the server goes down. Is
> this correct? Is there a way in the ServletContextListener to destroy all
> active sessions? I couldn't find a way with ServletContext object I have
in
> the method contextDestroyed of my ServletContextListener.
>
> Thanks,
> JP
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org