On 8/22/07, Alfred Chan <[EMAIL PROTECTED]> wrote:
>
> 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?
How about using a cookie for this?
Eelco
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]