tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Setting cookie paths
Date Tue, 04 Nov 2003 04:13:11 GMT

"Jessica P. Hekman" <jphekman@arborius.net> wrote in message
news:Pine.LNX.4.44.0311031359220.9884-100000@pendaran.arborius.net...
> 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)?
>

You could try using a browser like Netscape 7/Mozilla that allows you to
view the information about your cookies.  This will tell you what the
browser thinks that the path is.  As both Tim and I have pointed out, the
browser won't return the 'path' information with the cookie, so it is not
possible to check the path on the returned cookie.

You could also try enabling the RequestDumperValve to see if the cookie is
actually returned (however, I doubt that it will tell you anything you don't
already know :).

> Thanks,
> Jessica
>
> On Mon, 27 Oct 2003, Jessica P. Hekman wrote:
>
> > On Mon, 27 Oct 2003, Bill Barker wrote:
> >
> > > The browser isn't returning the path information when it returns the
cookie,
> > > so Tomcat has no way of knowing what path it was created with.
> >
> > Well -- but when I later hit /bar/foo, I get the cookie back; and when I
> > hit /bar, I don't. So the path information seems to be set somewhere. Or
> > am I missing something?
> >
> > Also, shouldn't I be able to explicitly set the path (Cookie.setPath())
so
> > that it doesn't matter whether the browser gives the correct path or
not?
> >
> > j
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message