You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by vidhi <vi...@gmail.com> on 2012/09/13 07:03:50 UTC

Session Expiration Handling in Click

Hello everyone,

I am a newbie  to Apache Click Framework and I am evaluating
Clickide-2.3.0.0 from the past few days. I am stuck on one part involving
session timeouts.
I state my problem definition as follows -

If I want to handle session expiry by setting session timeout interval in my
server configuration (I am using apache tomcat 7),
there is no support provided by Click as provided in case of other
Frameworks like ZK (timeout-uri specified in .zul file)

All the work-arounds that I have found so far involve hard coding the
validation and constraint checks explicitely in java using Session objects
or Context manuipulation. No support available from Framework side.
Any help will be appreciated.
Thanks in advance.




--
View this message in context: http://click.1134972.n2.nabble.com/Session-Expiration-Handling-in-Click-tp7578240.html
Sent from the click-development mailing list archive at Nabble.com.

Re: Session Expiration Handling in Click

Posted by vidhi <vi...@gmail.com>.
Thanks Bob.

It was helpful. :)



--
View this message in context: http://click.1134972.n2.nabble.com/Session-Expiration-Handling-in-Click-tp7578240p7578249.html
Sent from the click-development mailing list archive at Nabble.com.

Re: Session Expiration Handling in Click

Posted by Bob Schellink <sa...@gmail.com>.
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 <vi...@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.

Re: Session Expiration Handling in Click

Posted by vidhi <vi...@gmail.com>.
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.

Re: Session Expiration Handling in Click

Posted by Gilberto <gi...@gmail.com>.
Hi vidhj,

The session timeout is strictly a function of a servlet container you
are using. Most of them listen to web.xml session-timeout property in
session-config section. Look up web.xml syntax on the web.[1]
This has nothing to do with Apache Click.

Regards,

Gilberto

[1] http://www.mkyong.com/servlet/how-to-configure-the-session-timeout-in-servlet/

2012/9/13 vidhi <vi...@gmail.com>:
> Hello everyone,
>
> I am a newbie  to Apache Click Framework and I am evaluating
> Clickide-2.3.0.0 from the past few days. I am stuck on one part involving
> session timeouts.
> I state my problem definition as follows -
>
> If I want to handle session expiry by setting session timeout interval in my
> server configuration (I am using apache tomcat 7),
> there is no support provided by Click as provided in case of other
> Frameworks like ZK (timeout-uri specified in .zul file)
>
> All the work-arounds that I have found so far involve hard coding the
> validation and constraint checks explicitely in java using Session objects
> or Context manuipulation. No support available from Framework side.
> Any help will be appreciated.
> Thanks in advance.
>
>
>
>
> --
> View this message in context: http://click.1134972.n2.nabble.com/Session-Expiration-Handling-in-Click-tp7578240.html
> Sent from the click-development mailing list archive at Nabble.com.