You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Saldy Mathew <sm...@webifyservices.com> on 2003/09/06 13:07:35 UTC

Session Time-Out Questions

Hi All

When  a session is timed out a default page of Tapestry comes up where on Clicking the restart session link i am taken to the Home page.Is there a way to avoid this by directly displaying the Home Page?.

Where do we need to set the time for session expiry?

Thanks,
Saldy.

Re: Session Time-Out Questions

Posted by Harish Krishnaswamy <hk...@comcast.net>.

Harish Krishnaswamy wrote:

>
>
> Saldy Mathew wrote:
>
>> Hi All
>>
>> When  a session is timed out a default page of Tapestry comes up 
>> where on Clicking the restart session link i am taken to the Home 
>> page.Is there a way to avoid this by directly displaying the Home Page?.
>>
> Yes, you may subclass BaseEngine and override 
> handleStaleSessionException()...
>
> protected void handleStaleSessionException(
>        StaleSessionException ex,
>        IRequestCycle cycle,
>        ResponseOutputStream output)
>        throws IOException, ServletException
> {
>       redirect("Home", cycle, output, ex);
> } 

Restarting is probably better than a redirect, I guess, so the session 
invalidated properly...

protected void handleStaleSessionException(
       StaleSessionException ex,
       IRequestCycle cycle,
       ResponseOutputStream output)
       throws IOException, ServletException
{
      restart(cycle);
}

>
>
>>
>> Where do we need to set the time for session expiry?
>>
> In web.xml, please see 
> http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/configuration.deployment-descriptor.html 
>
>
> <session-config>
>      <session-timeout>15</session-timeout>
> </session-config>
>
>>
>> Thanks,
>> Saldy.
>>
> -Harish
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


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


Re: Session Time-Out Questions

Posted by Harish Krishnaswamy <hk...@comcast.net>.

Saldy Mathew wrote:

>Hi All
>
>When  a session is timed out a default page of Tapestry comes up where on Clicking the restart session link i am taken to the Home page.Is there a way to avoid this by directly displaying the Home Page?.
>
Yes, you may subclass BaseEngine and override 
handleStaleSessionException()...

protected void handleStaleSessionException(
        StaleSessionException ex,
        IRequestCycle cycle,
        ResponseOutputStream output)
        throws IOException, ServletException
{
       redirect("Home", cycle, output, ex);
}

>
>Where do we need to set the time for session expiry?
>
In web.xml, please see 
http://jakarta.apache.org/tapestry/doc/TapestryUsersGuide/configuration.deployment-descriptor.html

<session-config>
  	<session-timeout>15</session-timeout>
</session-config>

>
>Thanks,
>Saldy.
>
-Harish



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