Re: How to check if a session is still valid?
Re: How to check if a session is still valid?
- Subject: Re: How to check if a session is still valid?
- From: Jonathan Miller <email@hidden>
- Date: Fri, 15 Dec 2006 09:11:58 -1000
Thanks Jerry the latter did the trick!
BR
Jon
On Dec 15, 2006, at 3:33 AM, Jerry W. Walker wrote:
Hi, Jonathan,
I presume that you're in a DirectAction method when trying to do
this. If so, check the following WOAction method (WOAction is
WODirectAction's superclass):
public WOSession existingSession()
Restores the session based on the request. If the request did not
have a session ID or the session ID referred to a non-existent
session, then this method returns null. To determine if a session
failed to restore, check the request's session ID to see if it non-
null and if so, call this method to check its result.
Returns:
a WOSession object which represents periods during which access to
a WebObjects application and its resources is granted to a
particular client
If you're not in a DirectAction method, look at WOContext's method:
public boolean hasSession()
Returns true if a session exists for the receiving context, false
otherwise.
Regards,
Jerry
On Dec 14, 2006, at 9:45 PM, Jonathan Miller wrote:
Hi,
Is there a way to check to see if the session ID stored in a
cookie is still valid? Can this be done without creating a new
session?
Thanks in advance
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
This email sent to email@hidden
--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial
Strength Internet Enabled Systems
email@hidden
203 278-4085 office
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden