Re: WOComponent.hasSession()
Re: WOComponent.hasSession()
- Subject: Re: WOComponent.hasSession()
- From: Chuck Hill <email@hidden>
- Date: Mon, 29 Aug 2005 10:21:53 -0700
On Aug 29, 2005, at 10:07 AM, Kieran Kelleher wrote:
I am integrating some direct actions into my app and ensuring I
still handle http/https switching, JIT login, etc. properly.
When I only used component actions, my JIT login depended on
hasSession() method of WOComponent as a prerequisite for checking
if the session had an authenticated user.
What I am finding with diract actions is that although I really
have a session (wosid in the URL), the hasSession() method returns
false. Is that correct behaviour? The WOComponent.hasSession() API
does not seem to indicate. Should I be using some other method to
check the response directly for wosid?
IIRC, what you are seeing is correct / expected behavior. It's
Monday. I've had one cup of coffee. So take this for what's it
worth. :-)
If the direct action does not reference session() or existingSession
() then the session is not restored. If the session is not restored
then WOComponent.hasSession() returns false. You could try to use
context().request().existingSession() != null in place of the
hasSession() call, call context().request().existingSession() before
calling hasSession(), or add a call to existingSession in
DirectAction.performAction before calling super.performAction().
Chuck
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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