Displaying a session expiration page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Displaying a session expiration page

Vincent Girard-Reydet
Hi,

I have a server application that manages sessions. But when the session
expires, a new session is started without notifying the user, which
results in the website displaying the default page.

The behaviour is easy to reproduce: open /seaside/config, edit an
application without pressing "Done", then wait for 10 minutes => you're
back at the table of entrypoints. Instead, I'de like to display an
expiration page, then go to the new page.

I've looked at WAApplication>>#handleExipredRequest: , and I thought of
subclassing WAApplication to override this message. But I don't see how
I could first display the warning page, then display the default page (I
can't call components from #handleExpiredRequest:).

Any idea or better suggestions ?

Thank you.

Vincent
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a session expiration page

Michel Bany

On 09 Jan 2007, at 12:54 , Vincent Girard-Reydet wrote:

> Hi,
>
> I have a server application that manages sessions. But when the  
> session expires, a new session is started without notifying the  
> user, which results in the website displaying the default page.
>
> The behaviour is easy to reproduce: open /seaside/config, edit an  
> application without pressing "Done", then wait for 10 minutes =>  
> you're back at the table of entrypoints. Instead, I'de like to  
> display an expiration page, then go to the new page.
>
> I've looked at WAApplication>>#handleExipredRequest: , and I  
> thought of subclassing WAApplication to override this message. But  
> I don't see how I could first display the warning page, then  
> display the default page (I can't call components from  
> #handleExpiredRequest:).
>
> Any idea or better suggestions ?
>

Salut Vincent,

I have never done it, but here is what I would try.

Subclass WAApplication making sure you re-implement #description on  
the class side.
Then recreate your Seaside app using config and selecting the new  
WAApplication subclass
in the "type" selection list. This can surely be done  
programmatically as well.
Once this is done, you will be able to re-implement  
#handleExpiredRequest: to your liking.

Best luck,
Michel.


> Thank you.
>
> Vincent
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Displaying a session expiration page

Michel Bany
> Once this is done, you will be able to re-implement  
> #handleExpiredRequest: to your liking.
>

Sorry I responded too quickly with something you tried already.
In #handleExpiredRequest: you can build a redirect response to
another application that will show the expiration component.
You can also simply re-implement #expiryPathFor:

HTH,
Michel.




_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside