30/09/2008

Redirecting on session expiry

I am collecting up little code snippets, because I am bound to need them at some stage. I am tempted to start my own wiki, however, I think it would be better if there is somewhere I can store this on the smalltalk wiki - that way everyone can benefit from them.

This snippet controls the redirection of the user when their session expires.


You should overwrite the expire method on your session and redirect to the
desired url,
i.e:
MySession>> expire
super expire.
self redirectTo: 'http://seaside.st'

2 comments:

Randal L. Schwartz said...

If they're seaside-related, they can be put on the Seaside FAQ.

Andy Burnett said...

Thanks Randal, I learnt two things at once there :-)

1. There is a place to put this stuff - still slowly finding my way around.

2. The answer to session expiry is already logged on the site.