Does anyone know how to check if a Zope Session has timed out? I know that this value is set in the Session Data Container object that resides in the Temp folder at the root level. But how can I check to see if this time limit has been exceeded? I would like to redirect the user to a customized error page when this happens. Any help would be greatly appreciated. Thanks. - Asad
write some key-value pair in the session when it starts. check for the key in the session when you want to test if it has expired. -aj --On Freitag, 24. September 2004 10:00 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Does anyone know how to check if a Zope Session has timed out? I know that this value is set in the Session Data Container object that resides in the Temp folder at the root level. But how can I check to see if this time limit has been exceeded? I would like to redirect the user to a customized error page when this happens. Any help would be greatly appreciated. Thanks.
- Asad _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Hello. Thanks for your input. Isn't there a better way to achieve this? Is there a pre-defined function I could use, perhaps? - Asad On Fri, 24 Sep 2004, Andreas Jung wrote:
write some key-value pair in the session when it starts. check for the key in the session when you want to test if it has expired.
-aj
--On Freitag, 24. September 2004 10:00 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Does anyone know how to check if a Zope Session has timed out? I know that this value is set in the Session Data Container object that resides in the Temp folder at the root level. But how can I check to see if this time limit has been exceeded? I would like to redirect the user to a customized error page when this happens. Any help would be greatly appreciated. Thanks.
- Asad _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
--On Freitag, 24. September 2004 10:28 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Thanks for your input. Isn't there a better way to achieve this? Is there a pre-defined function I could use, perhaps?
You could look at the API yourself :-) -aj
----- Original Message ----- From: "Andreas Jung" <lists@andreas-jung.com>
--On Freitag, 24. September 2004 10:28 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Thanks for your input. Isn't there a better way to achieve this?
Is
there a pre-defined function I could use, perhaps?
You could look at the API yourself :-)
Good one Andreas! I don't mind helping people (sometimes its even fun to track down an issue, and I definitely like being on the receiving end of the help!), but lately I get the feeling that some people are using this list as a 'solution-of-first-resort' instead of spending some time to learn/research their problem... ok, enough grumping for today :) Jonathan
--On Freitag, 24. September 2004 10:55 Uhr -0400 Jonathan Hobbs <toolkit@magma.ca> wrote:
----- Original Message ----- From: "Andreas Jung" <lists@andreas-jung.com>
--On Freitag, 24. September 2004 10:28 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Thanks for your input. Isn't there a better way to achieve this?
Is
there a pre-defined function I could use, perhaps?
You could look at the API yourself :-)
Good one Andreas!
I don't mind helping people (sometimes its even fun to track down an issue, and I definitely like being on the receiving end of the help!), but lately I get the feeling that some people are using this list as a 'solution-of-first-resort' instead of spending some time to learn/research their problem... ok, enough grumping for today :)
Come on. ChrisM has written a fine chapter in the Zope Book that describes the sessions *very well*. And the code is documented very fine as well...it's a matter of personal efforts. -aj
Ah, so I see how it is. It takes two to pick on one. Well, who has more spare time on their hands, those who post messages to the list asking for help, or those who post messages shunning others that ask for help? Both of you could do us all a favor by keeping your worthless comments to yourself. - Asad On Fri, 24 Sep 2004, Andreas Jung wrote:
--On Freitag, 24. September 2004 10:55 Uhr -0400 Jonathan Hobbs <toolkit@magma.ca> wrote:
----- Original Message ----- From: "Andreas Jung" <lists@andreas-jung.com>
--On Freitag, 24. September 2004 10:28 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Thanks for your input. Isn't there a better way to achieve this?
Is
there a pre-defined function I could use, perhaps?
You could look at the API yourself :-)
Good one Andreas!
I don't mind helping people (sometimes its even fun to track down an issue, and I definitely like being on the receiving end of the help!), but lately I get the feeling that some people are using this list as a 'solution-of-first-resort' instead of spending some time to learn/research their problem... ok, enough grumping for today :)
Come on. ChrisM has written a fine chapter in the Zope Book that describes the sessions *very well*. And the code is documented very fine as well...it's a matter of personal efforts.
-aj _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
--On Freitag, 24. September 2004 12:21 Uhr -0400 Asad Habib <ahabib@engin.umich.edu> wrote:
Ah, so I see how it is. It takes two to pick on one. Well, who has more spare time on their hands, those who post messages to the list asking for help, or those who post messages shunning others that ask for help? Both of you could do us all a favor by keeping your worthless comments to yourself.
It's all about using existing resources e.g. the Zope Book. People have spend a lot of time producing documentation. So don't complain if you don't want to use it. -aj
Asad Habib wrote at 2004-9-24 10:00 -0400:
Does anyone know how to check if a Zope Session has timed out?
When the session times out, it is deleted. Thus, you can try to find out whether the user still has a session object or not. Check the "SessionDataContainer" API for such a check. You will also need the "BrowserIdManager" API to find out the session id for the current user. Advice: Andreas told you about a different solution (which you did not like). I tell you now that this is probably the most easy and most reliable solution that you will find. Maybe, you reconsider your position? -- Dieter
participants (4)
-
Andreas Jung -
Asad Habib -
Dieter Maurer -
Jonathan Hobbs