tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: response.addCookie() problem
Date Tue, 08 Aug 2000 21:55:29 GMT
Mason Jones wrote:

> Thanks for the suggestion on this. It actually turns out that
> what I was doing was in working, but when I used a page
> outside my webapp to display the cookies, they weren't
> showing up. I'm still not sure why that is, since the cookies
> should obviously be tied to the domain name, not the webapp.

Actually, that is not necessarily true.  When you create a cookie, you
can use the "path" property to say that this cookie should only be sent
back if the domain matches *and* the beginning of the request URI
matches the specified path.  For example, Tomcat uses this to ensure
that the session ID cookie (which always has the same cookie name)
always goes back to the correct app.

> (I've got a simple little page to display cookies which uses
> PHP, but it's not seeing the cookies that are being set by the
> tomcat servlet...weird. Anyone have ideas why this is?)

One possibility is if you are setting cookies and doing a
sendRedirect(), and are running Tomcat 3.1, you've run into a bug.  Try
it with Tomcat 3.2beta2.

> Thanks for the help.

Craig McClanahan

View raw message