You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tony Wu <e9...@gmail.com> on 2010/05/04 01:59:29 UTC

Session Timeout - detect last visited page and redirect accordingly

I have an application where on session timeout, I want to redirect to
different pages based on what their last visited page was. Currently my app
only redirects to the same page all the time through
getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is there
any way to capture the prior page and redirect them accordingly?

Thanks,
Tony

Re: Session Timeout - detect last visited page and redirect accordingly

Posted by Igor Vaynberg <ig...@gmail.com>.
if not in url or cookies your only other space is session, and since
that has timed out...

-igor

On Mon, May 3, 2010 at 5:43 PM, Tony Wu <e9...@gmail.com> wrote:
> Seems messy to have to carry that to every single URL. I was thinking about
> redirecting to a Proxy page and having the logic there to redirect
> elsewhere. The thing is I don't know what page I'm from once I'm at the
> proxy. I suppose I can store the last visited page in a cookie, but I'd like
> to avoid that route if possible.
>
> On Mon, May 3, 2010 at 5:32 PM, Igor Vaynberg <ig...@gmail.com>wrote:
>
>> you can append the class name of the last visited page to every url by
>> creating your own url coding strategy
>>
>> -igor
>>
>> On Mon, May 3, 2010 at 4:59 PM, Tony Wu <e9...@gmail.com> wrote:
>> > I have an application where on session timeout, I want to redirect to
>> > different pages based on what their last visited page was. Currently my
>> app
>> > only redirects to the same page all the time through
>> > getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is
>> there
>> > any way to capture the prior page and redirect them accordingly?
>> >
>> > Thanks,
>> > Tony
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>

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


Re: Session Timeout - detect last visited page and redirect accordingly

Posted by Tony Wu <e9...@gmail.com>.
Seems messy to have to carry that to every single URL. I was thinking about
redirecting to a Proxy page and having the logic there to redirect
elsewhere. The thing is I don't know what page I'm from once I'm at the
proxy. I suppose I can store the last visited page in a cookie, but I'd like
to avoid that route if possible.

On Mon, May 3, 2010 at 5:32 PM, Igor Vaynberg <ig...@gmail.com>wrote:

> you can append the class name of the last visited page to every url by
> creating your own url coding strategy
>
> -igor
>
> On Mon, May 3, 2010 at 4:59 PM, Tony Wu <e9...@gmail.com> wrote:
> > I have an application where on session timeout, I want to redirect to
> > different pages based on what their last visited page was. Currently my
> app
> > only redirects to the same page all the time through
> > getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is
> there
> > any way to capture the prior page and redirect them accordingly?
> >
> > Thanks,
> > Tony
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Session Timeout - detect last visited page and redirect accordingly

Posted by Igor Vaynberg <ig...@gmail.com>.
you can append the class name of the last visited page to every url by
creating your own url coding strategy

-igor

On Mon, May 3, 2010 at 4:59 PM, Tony Wu <e9...@gmail.com> wrote:
> I have an application where on session timeout, I want to redirect to
> different pages based on what their last visited page was. Currently my app
> only redirects to the same page all the time through
> getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is there
> any way to capture the prior page and redirect them accordingly?
>
> Thanks,
> Tony
>

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


Re: Session Timeout - detect last visited page and redirect accordingly

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Yea, but if it's in the DB, then you also need a cookie for auto-login,
because if they aren't logged in, how will you tie them to the row in the
DB?  And if their session is expired, they won't be logged in.

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, May 4, 2010 at 3:01 AM, Zilvinas Vilutis <ci...@gmail.com> wrote:

> I've added an ajax timer so session timeout never happens on an open
> browser.
>
> Or you can always store your user state in the DB if you want, e.g.
> the URL visited.
>
> Žilvinas Vilutis
>
> Mobile:   (+370) 652 38353
> E-mail:   cikasfm@gmail.com
>
>
>
> On Mon, May 3, 2010 at 4:59 PM, Tony Wu <e9...@gmail.com> wrote:
> > I have an application where on session timeout, I want to redirect to
> > different pages based on what their last visited page was. Currently my
> app
> > only redirects to the same page all the time through
> > getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is
> there
> > any way to capture the prior page and redirect them accordingly?
> >
> > Thanks,
> > Tony
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Session Timeout - detect last visited page and redirect accordingly

Posted by Zilvinas Vilutis <ci...@gmail.com>.
I've added an ajax timer so session timeout never happens on an open browser.

Or you can always store your user state in the DB if you want, e.g.
the URL visited.

Žilvinas Vilutis

Mobile:   (+370) 652 38353
E-mail:   cikasfm@gmail.com



On Mon, May 3, 2010 at 4:59 PM, Tony Wu <e9...@gmail.com> wrote:
> I have an application where on session timeout, I want to redirect to
> different pages based on what their last visited page was. Currently my app
> only redirects to the same page all the time through
> getApplicationSettings().setPageExpiredErrorPage(LoginPage.class). Is there
> any way to capture the prior page and redirect them accordingly?
>
> Thanks,
> Tony
>

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