You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by me...@investorservicing.natixis.fr on 2007/05/09 17:14:20 UTC

Session Expiration Handling

Depuis le 21 décembre 2006, Natexis Investor Servicing s'appelle Natixis Investor Servicing. Les adresses mails des collaborateurs ayant changé, veillez à la mise à jour de votre carnet d'adresses.


Hi all,
I would like to write an Interceptor that will handle the session 
expiration.
If somone has already written something like that, thanks to tell me how.
If not here is my idea.

my interceptor will retrieve the session. A private method will tell me if 
the session is still valid.
here is an extract:

public String intercept(ActionInvocation invocation) throws Exception
        {
        Map session = invocation.getInvocationContext().getSession();
        if(isSessionExpired(session))
                {
                        return Constants.SESSION_EXPIRED_ACTION;
                } 
        else
                {
                        return invocation.invoke();
                }

        }

        private boolean isSessionExpired(Map session)
        {
        return true;
        }

When I put an object in the session (in the first action that is called 
for example),
is there a way to test if the session is still valid ?

any help is greetly appreciated.

Meissa


L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur.
Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si necessaire

The integrity of this message cannot be guaranteed on the Internet. Natixis can not therefore be considered responsible for the contents. Any unauthorized use or dissemination is prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender.