I can't speak from personal experience, but David Flanagan says, in the O'Reilly book JavaScript, the Definitive Guide, "By default, a cookie is associated with, and accessible to, the web page that created it and any other web pages in the same directory or any subdirectories of that directory."
So if you set the cookie under /foo, /foo/bar can access it. But when you set it in /foo/bar, /foo cannot access it unless you set the path to /foo. >-----Original Message----- >From: Tim Funk [mailto:[EMAIL PROTECTED] >Sent: Monday, November 03, 2003 5:56 PM >To: Tomcat Users List >Subject: Re: Setting cookie paths > > >Browsers only send the cookie name and value. Expiration, >path, and other >attributes are unknown since they are not sent by a browser. > >But the browser stores all this information itself so it knows >when to send >the cookie. It just doesn't send everything about the cookie. > >-Tim > >Jessica P. Hekman wrote: > >> Hi all. I know it's a little obnoxious to re-send this >message, but I >> didn't get a response, and I know that this list is >high-volume enough >> that it's easy for posts to be overlooked. >> >> I am at a complete loss as to why, when I set a cookie under >/foo/bar, I >> cannot then see it under /foo -- while Cookie.getPath() >returns "null" >> (whether I call Cookie.setPath() or not). Surely if the >problem were that >> the browser doesn't return the path information, the cookie would be >> available at all paths (or no paths)? >> >> Thanks, > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >
