You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Oxley <da...@staffplanner.co.uk> on 2001/08/17 17:28:29 UTC
Cookies and IE5.5
I am trying to set a cookie that can be picked up from a different server to
the one setting it. They both belong to the same domain (daves.domain.com
and daves2.domain.com).
The first server sets the cookie and redirects to the second server where
the cookie is read.
On IE5.5 and above the cookie does not get set, but it works fine for IE5
and Mozilla.
Is this a bug with later versions of IE or am I doing something wrong.
This is the code:
Cookie c = new Cookie("User", "DAVE");
c.setDomain("domain.com");
c.setPath("/servlet/LogonServlet");
c.setMaxAge(60);
c.setVersion(1);
resp.addCookie(c);
resp.sendRedirect (redirect_url) ;
Dave.
Dave@Staffplanner.co.uk
RE: Cookies and IE5.5
Posted by Martin van den Bemt <ma...@isallineed.org>.
If it returns null, then I read something about that this week.. Maby
searching on of the archives for cookies helps you find the problem /
solution...
Also tomcat version could be important and the exception (if any..)
Mvgr,
Martin
> -----Original Message-----
> From: David Oxley [mailto:dave@staffplanner.co.uk]
> Sent: Friday, August 17, 2001 5:28 PM
> To: 'tomcat-user@jakarta.apache.org'
> Subject: Cookies and IE5.5
>
>
> I am trying to set a cookie that can be picked up from a
> different server to
> the one setting it. They both belong to the same domain (daves.domain.com
> and daves2.domain.com).
> The first server sets the cookie and redirects to the second server where
> the cookie is read.
> On IE5.5 and above the cookie does not get set, but it works fine for IE5
> and Mozilla.
> Is this a bug with later versions of IE or am I doing something wrong.
> This is the code:
> Cookie c = new Cookie("User", "DAVE");
> c.setDomain("domain.com");
> c.setPath("/servlet/LogonServlet");
> c.setMaxAge(60);
> c.setVersion(1);
> resp.addCookie(c);
> resp.sendRedirect (redirect_url) ;
>
> Dave.
> Dave@Staffplanner.co.uk
>
Re: Cookies and IE5.5
Posted by Tim O'Neil <ti...@xythos.com>.
At 08:28 AM 8/17/2001, you wrote:
>I am trying to set a cookie that can be picked up from a different server to
>the one setting it. They both belong to the same domain (daves.domain.com
>and daves2.domain.com).
>The first server sets the cookie and redirects to the second server where
>the cookie is read.
>On IE5.5 and above the cookie does not get set, but it works fine for IE5
>and Mozilla.
>Is this a bug with later versions of IE or am I doing something wrong.
You may not be doing anything wrong, I think that's how cookies
are supposed to work. Reading ftp://ftp.isi.edu/in-notes/rfc2109.txt
doesn't (to me) explicately say "Servers within the same domain may
not share cookies", but what it does say is a particular server may set
a cookie that is only accessible by itself, which implies to me that
this is not allowed. The RFC also indicates past and present behavior,
and Netscape by name. It's entirely possible that while you were able
to do this before, it was taken out in later clients and servers to
comply with the RFC's final form. But like I said, I have a hard time
interpreting RFC's for particular questions. Maybe some one else has
a better handle on all this?