You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Tobi81 <to...@web.de> on 2012/11/26 22:14:12 UTC

Avoid session timeout through AjaxSelfUpdatingTimerBehavior

hi,

i got a problem with wicket's session timeout. i'm using wicket version
1.4.9. i set the session timeout to 1 minute in the file web.xml.
in my case this is necessary to recognize if an user is on-/offline quite
fast. if the user closes the browser the session is timed out after 1
minute.

i don't want the session to timeout in case the user is hanging around on
one of the pages. so what i did is to establish a self updating timer in the
following way:

	add(lblMessages);
	lblMessages.add(new
AjaxSelfUpdatingTimerBehavior(Duration.seconds(GloCon.TIMER_UPDATE_HEADER))); 
		
the label is updated every 30 seconds and part of a panel that is part of
all pages. and still i got session timeouts. i can't figure out why!? i
searched the web already for a while: the above mentioned solutions is
exactly what should work.
i found also something about constructors and PageParameters ... but this
happens also on pages with PageParameters in the constructor.

or is tomcat the problem (version 6)?

can you please help me ...

regards,
tobi



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Avoid-session-timeout-through-AjaxSelfUpdatingTimerBehavior-tp4654240.html
Sent from the Users forum 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: Avoid session timeout through AjaxSelfUpdatingTimerBehavior

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

This should work.
Make sure the Ajax call hits the server side, i.e. check that onTimer()
method is actually called.
Next try with a quickstart application that uses newer versions of both
Wicket and Tomcat.


On Mon, Nov 26, 2012 at 10:14 PM, Tobi81 <to...@web.de> wrote:

> hi,
>
> i got a problem with wicket's session timeout. i'm using wicket version
> 1.4.9. i set the session timeout to 1 minute in the file web.xml.
> in my case this is necessary to recognize if an user is on-/offline quite
> fast. if the user closes the browser the session is timed out after 1
> minute.
>
> i don't want the session to timeout in case the user is hanging around on
> one of the pages. so what i did is to establish a self updating timer in
> the
> following way:
>
>         add(lblMessages);
>         lblMessages.add(new
>
> AjaxSelfUpdatingTimerBehavior(Duration.seconds(GloCon.TIMER_UPDATE_HEADER)));
>
> the label is updated every 30 seconds and part of a panel that is part of
> all pages. and still i got session timeouts. i can't figure out why!? i
> searched the web already for a while: the above mentioned solutions is
> exactly what should work.
> i found also something about constructors and PageParameters ... but this
> happens also on pages with PageParameters in the constructor.
>
> or is tomcat the problem (version 6)?
>
> can you please help me ...
>
> regards,
> tobi
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Avoid-session-timeout-through-AjaxSelfUpdatingTimerBehavior-tp4654240.html
> Sent from the Users forum 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
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>