You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by "Warnken, Jens" <Je...@IZB-SOFT.de> on 2000/07/17 17:53:15 UTC

Cookies not set with response.sendRedirect?

Hi there,

I tried out Tomcat 3.1and code that worked fine with 3.0 does not do anymore
what it should. I have a servlet that checks if the browser allows cookies.
The servlet sets a cookie and then sends a redirect to itself to check if
the cookie is set. Does not work anymore with 3.1: the cookie is never
found. As the bug tracking system is not online at the moment I have to ask
here. Can anybody confirm this problem? Somebody working on it?

Thanks in advance,

Jens Warnken

-:-:-

Q: Good morning, Mr. Gates. Are you going to be a witness at the trial of
this matter?
Mr. Heiner (witness attorney): Objection.
The Witness: I don't know.
US vs. MS - CIV 98-1232(TPJ) - File-No 1-49005



RE: Cookies not set with response.sendRedirect?

Posted by "Carroll Guertin Jr." <ca...@openave.com>.
Yes, I've had the same problem with 3.1.  Supposedly it's fixed in the
nightly build, but I haven't verified it.

This is the response email I received:

> Tomcat should send cookies down when servlets use redirects -- sending the
> browser to a different location.
>
> Right now this does NOT happen.
>
> More detail:
> The method HttpServletResponseFacade.sendRedirect clears the headers,
which
> includes the cookies.
>
> Solution:
> ResponseImpl.reset() needs an option (flag maybe) so cookies may be kept.
>
> I hacked a fix for myself to enable quick integration into future releases
> of Tomcat, but I would spend time implementing a more elegant fix if there
> is interest in fixing this bug.
>

This bug has been fixed in the current nightly builds of Tomcat 3.2dev,
and
will be fixed in the final release.

>
> Please let me know.
>

Craig McClanahan


-----Original Message-----
From: Warnken, Jens [mailto:Jens.Warnken@IZB-SOFT.de]
Sent: Monday, July 17, 2000 8:53 AM
To: 'tomcat-dev@jakarta.apache.org'
Subject: Cookies not set with response.sendRedirect?


Hi there,

I tried out Tomcat 3.1and code that worked fine with 3.0 does not do anymore
what it should. I have a servlet that checks if the browser allows cookies.
The servlet sets a cookie and then sends a redirect to itself to check if
the cookie is set. Does not work anymore with 3.1: the cookie is never
found. As the bug tracking system is not online at the moment I have to ask
here. Can anybody confirm this problem? Somebody working on it?

Thanks in advance,

Jens Warnken

-:-:-

Q: Good morning, Mr. Gates. Are you going to be a witness at the trial of
this matter?
Mr. Heiner (witness attorney): Objection.
The Witness: I don't know.
US vs. MS - CIV 98-1232(TPJ) - File-No 1-49005



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