You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by novotny <no...@gridsphere.org> on 2008/12/09 20:15:25 UTC

getting page expired


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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: getting page expired

Posted by novotny <no...@gridsphere.org>.
I checked and everything is serializable, I tried stepping thru the code but
I don't see where in wicket is the behavior to choose the page expiration
page....


Mathias P.W Nilsson wrote:
> 
> Are there any loggers in the class? When using private Logger logger =
> Logger.getLogger(this.getClass());
> this might cause pag expired. If it is contained in a wicket web page. At
> least I know some of my collegues has got this a while ago. I'm not
> familiar with WASP so there might be someone else that can help you.
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: getting page expired

Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
Are there any loggers in the class? When using private Logger logger =
Logger.getLogger(this.getClass());
this might cause pag expired. If it is contained in a wicket web page. At
least I know some of my collegues has got this a while ago. I'm not familiar
with WASP so there might be someone else that can help you.
-- 
View this message in context: http://www.nabble.com/getting-page-expired-tp20921513p20923599.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: getting page expired

Posted by novotny <no...@gridsphere.org>.

userMap is just a normal HashMap

private final Map<String, String> userMap = new HashMap<String, String>();

I wonder if his problem is caused by WASP security somehow?


Mathias P.W Nilsson wrote:
> 
> What does userMap( userName ) returns? Make sure it is an object that
> implements serializable.
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: getting page expired

Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
What does userMap( userName ) returns? Make sure it is an object that
implements serializable.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org