How to avoid "Page Expired" messages on logout with Wicket after redirect
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-06T23:59:36Z
Indexed on
2010/04/07
0:03 UTC
Read the original article
Hit count: 833
Hi there.
I'm taking my first steps in to the world of Wicket. I've set up a login form and a logout page.
The logout page looks like this:
public class LogoutPage extends WebPage { public LogoutPage(final PageParameters pageParams) { getSession().invalidate(); setResponsePage(getApplication().getHomePage()); } }
When a user clicks the Logout link they're redirected to the homepage, so far so good. The problem is that when a user tries to click on any of the navigatable Link's they get a "Page Expired" message. I'd like to log the user out gracefully and allow the user to continue to browse the website without receiving the "Page Expired" message.
Any help is greatly appreciated.
By the way, I've tried to follow the Wicket examples but they seem to be using org.apache.wicket.authentication and I haven't figured out how to make this available to my project (I'm using eclipse and maven2).
© Stack Overflow or respective owner