I would like to redirect the user to his/her previous visiting page in case
of the session expiration.

So, I wrote a customized expired error page to do so.

public class ExpireRedirectPreviousPage extends WebPage {
    
    private static final long serialVersionUID = 1L;

    public ExpireRedirectPreviousPage() {
        // Redirect to original page
        getRequestCycle().setRequestTarget(
                new RedirectRequestTarget(getRequest().getPath()));
    }
}

It works fine with non-ajax requests. But, it doesn't work with ajax
requests, the getRequest().getPath() can only get back an empty path.
Finally, it will redirect to homepage, which is not desirable.

Would someone tell me how to get back the client side URL/path after an ajax
request in the expired error page?

Thanks,
Alfred
-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-previous-path-when-page-expires-through-Ajax-call-tf4310264.html#a12270504
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