how to set a cookie in a WORedirect ?
how to set a cookie in a WORedirect ?
- Subject: how to set a cookie in a WORedirect ?
- From: Gavin Eadie <email@hidden>
- Date: Sat, 30 Jul 2005 18:52:44 -0400
I must be missing something obvious but I'm having a lot of trouble
setting a cookie in the headers of a WORedirect. I can extract the
response and its headers from the WORedirect:
WORedirect redirect = app.pageWithName ("WORedirect", ...);
redirect.setUrl (https://weblogin.umich.edu/cgi-bin/logout);
NSLog.out.applendln( "resp-headers: " +
redirect.generateResponse().headers());
and I can set a cookie on the response:
WOCookie cookie = new WOCookie("xxx", "yyy", "", "",
new NSTimestamp(new java.util.Date(0L)), true);
redirect.generateResponse().addCookie(cookie);
but the WOResponse obtained by generateResponse() is a copy of the
WOResponse data, not a reference to it, and I cannot figure how to
directly manipulate the WORedirect's response or replace it by a
manipulated copy. As I said this must be pretty simple but I have
searched hard and have hit a blind spot ... thanks for any help.
_______________________________________________
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