The logout is working but the redirect isn't? is that the issue? Are you sure onActionFromLogout method is getting called?
You code seems OK, although I prefer to use PageRenderLinkSource. In your case the return would be something like: return linkSource.createPageRenderLink(Index.class); Alejandro. On Fri, Jun 24, 2011 at 5:21 PM, cablepuff <cablep...@gmail.com> wrote: > > So i have many pages that implements "onActionFromLogout" > > @InjectPage > private Index index; > > public Object onActionFromLogout() { > 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(); > // some more stuff .... > } catch (Exception ex) { > LOG.error("error in logging out", ex); > } > > return index; > } > > but when I click on the logout link generated by <t:loginLink> tag it does > not take me to the index page. I want to invalidate the session, logout and > get taken to index page instead of staying on the same page. > > What is happening. > post logout > page A --> page A > page B --> page B > page C --> page C > > What should happen. > Instead I want page A --> Index. > > What is wrong? What is the best way to solve the problem. > Thanks > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Tapestry-5-25-with-Tynamo-0-4-0-onActionFromLogout-not-redirecting-to-index-page-tp4521350p4521350.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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org