Re: Can't retrieve cookies (closer, but not there yet)
Re: Can't retrieve cookies (closer, but not there yet)
- Subject: Re: Can't retrieve cookies (closer, but not there yet)
- From: Chuck Hill <email@hidden>
- Date: Wed, 11 Nov 2009 08:18:22 -0800
Look at those two cookies in the browser. What is different?
Chuck
On Nov 10, 2009, at 9:34 PM, Jeff Schmitz wrote:
Nope, not there (see below). But this is interesting. I used
Safari this time, and it shows 2 cookies for localhost,
jforumUserId=49 which is in the headers, and POOL=BIG, which is
not. Why would one get passed on, and not the other. Both have
expiration dates in 2010.
Nov 10 23:25:32 netBrackets[7777] (ERXNSLogLog4jBridge.java:40)
INFO NSLog - Headers: {remote_host = ("::1"); server_software =
("Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.7l DAV/2"); cookie
= ("jforumUserId=49"); user-agent = ("Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko)
Version/4.0.3 Safari/531.9"); document_root = ("/Library/WebServer/
Documents"); server_name = ("localhost"); accept = ("application/
xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/
png,*/*;q=0.5"); remote_addr = ("::1"); referer = ("http://localhost/cgi-bin/WebObjects/netBrackets.woa/-7777
"); x-webobjects-adaptor-version = ("Apache"); x-webobjects-request-
id = ("4afa36e5000000d800000009"); x-webobjects-request-method =
("GET"); server_admin = ("email@hidden"); script_filename = ("/
cgi-bin"); server_port = ("0"); accept-encoding = ("gzip, deflate");
remote_port = ("50241"); host = ("localhost"); accept-language =
("en-us"); connection = ("close"); }
On Nov 10, 2009, at 11:22 PM, Chuck Hill wrote:
On Nov 10, 2009, at 9:11 PM, Jeff Schmitz wrote:
Holy resurrected thread batman. I never did get cookies working,
and I'd REALLY like to figure out why. I've got a brand new dev
machine, running Eclipse 3.4, WOLips 3.4.5830. Everything is
running great through apache, with DirectConnect Disabled and a
nice URL of:
http://localhost/cgi-bin/WebObjects/netBrackets.woa/-7777
I'm using WOCookie to set my cookie:
NSTimestamp expires = new NSTimestamp()
.timestampByAddingGregorianUnits(1, 0, 0, 0, 0, 0);
WOCookie poolCookie = new WOCookie("POOL",
Session().getPoolName(), "/", null, expires, true);
response.addCookie(poolCookie);
I look in my Browser (Firefox) and the cookie is there, saved
under host "localhost" with an expiration of next year.
Then, in my DirectAction function I try to retrieve the cookie:
String poolName = (String)
this.request().cookieValueForKey("POOL");
And NO DICE. No cookies returned at all. And this seems so
simple. any ideas?
NSLog.out.appendln(this.request().headers());
See it in there? If so, you are retrieving it wrong. If is not
there, the browser is not sending it, or you are looking for it in
wrong request (somehow).
Chuck
On Jan 10, 2008, at 8:24 PM, Guido Neitzer wrote:
On 10.01.2008, at 19:17, Chuck Hill wrote:
Maybe you are ... I have Yojimbo and my own notes ... ;-)
Well, that's smart, ain't it?
;-)
cug
_______________________________________________
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
_______________________________________________
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
--
Chuck Hill Senior Consultant / VP Development
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
--
Chuck Hill Senior Consultant / VP Development
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