• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Adding cookies in a DA method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding cookies in a DA method


  • Subject: Re: Adding cookies in a DA method
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 18 Oct 2006 20:57:18 -0700

Hi Kieran,

I was kind of thinking that it should just work. I can't think of why it would not work in a DA. addCookie is tranlated into a setHeader(s) late in the R-R loop. I have had some issues with setting headers in the past, but I am too tired to recall them at the moment.

You might try something like this in appendToResponse if addCookie is not working there:


WOCookie cookie1 = new WOCookie(...); WOCookie cookie2 = new WOCookie(...);

// Have to do this instead of calling addCookie() as cookies () is not copied into the headers outside of the R-R loop.
NSMutableArray killedCookies = new NSMutableArray(2);
killedCookies.addObject(cookie1.headerString());
killedCookies.addObject(cookie2.headerString());
response.setHeaders(killedCookies, "set-cookie");



FWIW

Chuck


On Oct 18, 2006, at 8:40 PM, Kieran Kelleher wrote:

Hi,

Adding cookies using context().response().addCookie( ... ) in a WOComponent is fine, but how do you add a cookie in a WODirectAction action?

Regards, Kieran
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific 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


References: 
 >Adding cookies in a DA method (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Adding cookies in a DA method
  • Next by Date: Re: Adding cookies in a DA method
  • Previous by thread: Adding cookies in a DA method
  • Next by thread: Re: Adding cookies in a DA method
  • Index(es):
    • Date
    • Thread