Re: WOCookie
Re: WOCookie
- Subject: Re: WOCookie
- From: Karl Gretton <email@hidden>
- Date: Wed, 14 Mar 2007 07:54:54 -0400
Not sure that I am understanding what you mean.
If you are asking whether WO can store its session info in a cookie:
- WO can store session and instance information in a cookie, rather
than in a web browser. This would solve your previous post issue
about what happens when you open a new window or tab.
See http://tuvix.apple.com/s//WebObjects/Reference/API5.2.3/com/
webobjects/appserver/WOSession.html#storesIDsInCookies()
Setting this to true enables that behaviour. You can have the
session information in both the URL and a cookie if you want.
If you are asking whether WO can store other information in a cookie:
- WO can manipulate cookies through the WOCookie class.
See http://developer.apple.com/documentation/Webobjects/Reference/API/
com/webobjects/appserver/WOCookie.html
If you are asking whether you can detect if cookies are enabled on
the client browser, there are a number of techniques for this, none
of them particularly WO specific.
The simplest way that I have found is to set a cookie in one place
and then redirect the browser to another URL which then checks
whether the cookie is set and displays an error messasge saying that
cookies must be enabled - or switches to using session info stored in
the URL for example.
For example, using an automatic feature of WO rather than using
WOCookie:
- User goes to landing page / home page using a Component or Direct
action.
- WO creates a session with storesIDsInCookies set to true.
- Page redirects to another Component or Direct action either
immediately or when the user clicks something.
- WO checks whether there is a session available because there SHOULD
be one to get to this page.
- WO either returns the correct page or returns an error page or
creates a session with storesIDsInCookies set to false and
storesIDsInURLs set to true.
Karl
On Mar 14, 2007, at 7:36 AM, WIESEN Bruno wrote:
Hello,
Is there a way to detect if the cookies are enabled with WebObjects?
Thank you.
Bruno.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40protocolis.com
This email sent to email@hidden
_______________________________________________
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
References: | |
| >WOCookie (From: WIESEN Bruno <email@hidden>) |