click-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <sab...@gmail.com>
Subject Re: Session Expiration Handling in Click
Date Fri, 14 Sep 2012 05:50:57 GMT
Hi Vidhi,

While this isn't supported in Click it could be some we can look at if
there is a reliable way of implementing it across servers.

Just looking at the Servlet API the following check might work:

  boolean hasSession = request.getRequestedSessionId() != null;
  boolean hasExpired = !request.isRequestedSessionIdValid();
  if (hasSession and hasExpired) {
    response.sendRedirect("/expired.html");
  }

This check could be added to the ClickServlet.handleRequest method or
even a Filter which sits in front the of the ClickServlet.

Kind regards

Bob


On Fri, Sep 14, 2012 at 6:10 AM, vidhi <vidhi6891@gmail.com> wrote:
> Thanks Gilberto,
>
>  However, I want my App to send me to a pre specified URL in case of
> timeout. This is something that normally the UI Framework provides, like in
> case of ZK, we can specify timeout-uri tag whih will specify the url to be
> redirected to in case of timeout.
>
>   Can we implement this feature somehow in Click? I was thinking about
> writing my own "myClickServlet" which will extend Click's "ClickServlet" and
> implement the necessary timeout handling. Will that work?
>
>
>
>
> --
> View this message in context: http://click.1134972.n2.nabble.com/Session-Expiration-Handling-in-Click-tp7578240p7578245.html
> Sent from the click-development mailing list archive at Nabble.com.

Mime
View raw message