You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by George Christman <gc...@cardaddy.com> on 2012/03/28 18:14:11 UTC

Session timeout alert.

Hello, does tapestry provide a mechanism which monitors the amount of time
left with a user session before timeout? Similar to a an online banking
site, we need to alert the user when their session is about to expire and
give them the option to renew the time or auto log them out. If it doesn't
exist, I'm sure I could build the component, however I'm just not sure how
to get the users remaining session time to trigger the alert. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Session-timeout-alert-tp5601037p5601037.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Session timeout alert.

Posted by George Christman <gc...@cardaddy.com>.
Thanks guys, I'll take a look at your suggested solutions. I happened to find
this jQuery plugin during my google searches that might integrate nicely
with this task. 

http://philpalmieri.com/2009/09/jquery-session-auto-timeout-with-prompt/

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Session-timeout-alert-tp5601037p5601246.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Session timeout alert.

Posted by annon88 <an...@web.de>.
In addition to the post before:

Write a class which implemets javax.servlet.http.HttpSessionListener with
something like this:



>     @Override
>     public void sessionCreated(final HttpSessionEvent se) {
>         se.getSession().setMaxInactiveInterval(sessionTimeoutSeconds);
>     }
> 

A search in this forum returns much hits.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Session-timeout-alert-tp5601037p5601125.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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


Re: Session timeout alert.

Posted by Michael Prescott <mi...@gmail.com>.
The "remaining" time is something of a red herring: every client-to-server
interaction resets the countdown, so from the perspective of the server
processing a request, the remaining time will always be the full session
timeout value.  (I'm not sure how you pick this up from the container, but
no doubt a google search will tell you that.)

If you have AJAX components, this time will be somewhat pessimistic because
AJAX requests will also reset the countdown.  You might ignore this if you
don't have a lot of AJAX; to intercept these might require some ugly monkey
patching.

Michael

On 28 March 2012 12:14, George Christman <gc...@cardaddy.com> wrote:

> Hello, does tapestry provide a mechanism which monitors the amount of time
> left with a user session before timeout? Similar to a an online banking
> site, we need to alert the user when their session is about to expire and
> give them the option to renew the time or auto log them out. If it doesn't
> exist, I'm sure I could build the component, however I'm just not sure how
> to get the users remaining session time to trigger the alert.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Session-timeout-alert-tp5601037p5601037.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>