Hi,

I found a site for session handling using Tapestry5.
http://eubauer.de/kingsware/2010/02/04/track-login-and-logout-of-users-with-tapestry-5/
 

when ever session is destroyed, sessionDestroyed() method in
SessionListener[user-defined] class which is added in services package of
tapestry is automatically called.

can any one tell me how to redirect the browser to a default page ?
if i had response object i could have redirected to some page but that
method doesn't contain response object.

i have added the code for SessionListener class.

public class SessionListener implements HttpSessionListener {
        public void sessionCreated(HttpSessionEvent se) {
                // Do nothing
        }

        public void sessionDestroyed(HttpSessionEvent se) {
                System.out.println(" *      Session is destroyed      *  ");
                HttpSession session = se.getSession();
                Principal principal = (Principal)
session.getAttribute(AppModule.USER_LOGGED_IN);
                session.removeAttribute(AppModule.USER_LOGGED_IN);              
                // Do some stuff here...
        }
}

-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Redirect-when-session-is-destroyed-tp2849255p2849255.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to