Hi,

I'm creating a demo app where someone can select a prepacked identity from a
drop down box and be logged in as that user. The login process checks to see
if someone is already logged in, then logs them off  and logs in as the new
user before redirecting back to the logged in page. Problem is I keep
getting page expired after being redirected and I have no idea how to turn
this behavior off or where in the wicket stack it occurs. Stepping thru with
the debugger it does in face go thru the HomePage before ultimately
resulting in page expired. Here is the code below, it is using Swarm.

Form f = new Form("userform") {
            protected void onSubmit() {
                if (AuthenticatedSession.get().isAuthenticated()) {
                    AuthenticatedSession.get().logout();
                }
                try {
                    AuthenticatedSession.get().login(new LoginContext(new
UsernamePasswordAuthenticationToken(userMap.get(username), null)));
                } catch (LoginException e) {
                    throw new RuntimeException(e);
                }
                setResponsePage(new HomePage());
                setRedirect(true);
            }
        };

Thanks, Jason

-- 
View this message in context: 
http://www.nabble.com/getting-page-expired-tp20921513p20921513.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to