Hi Folks,

I believe my webapp is wired up properly. But not so when I click logout link.

Here is my logout link handler.

    @InjectPage("Login")
    private Login loginPage;

    Object onActionFromTynamoLogoutLink() {
        // Need to call this explicitly to invoke onlogout handlers (for
        // remember me etc.)
        SecurityUtils.getSubject().logout();
        try {
            // the session is already invalidated, but need to cause an
            // exception since tapestry doesn't know about it
            // and you'll get a container exception message instead without
            // this. Unfortunately, there's no way of
            // configuring Shiro to not invalidate sessions right now. See
            // DefaultSecurityManager.logout()
            // There's a similar issues in Tapestry - Howard has fixed, but no
            // in T5.2.x releases yet
            request.getSession(false).invalidate();
        } catch (Exception e) {
        }

        return loginPage;
    }

I have yet to see it take me to Login on clicking my logout link on my home 
page.

USE CASE: So... if while the app is up and running at Home page... I click 
logout link, it takes me to Home page and I get NPE for referring to what 
become null structures in my home template.

USE CASE: But... if while the app is up and running at Home page... I click the 
URL http://localhost:9011/pphl/login i am brought to login page in its inverted 
form which shows the same logout link <t:actionlink 
t:id="tynamoLogoutLink">Logout</t:actionlink> and when I click that same 
structured link as the same one in my home page, this one takes me back to the 
login page like its suppose to.

I have these configured
        configuration.add(SecuritySymbols.LOGIN_URL, "/" + PATH_PREFIX + 
"/login");
        configuration.add(SecuritySymbols.SUCCESS_URL, "/home");
        configuration.add(SecuritySymbols.UNAUTHORIZED_URL, "/" + PATH_PREFIX + 
"/unauthorized");


Is there a deficiency in tapestry preventing me from gracefully operating the 
first USE CASE ?


Thanks for any tips.

Ken
                                          

Reply via email to