Hi Gert,

This is a known bug in Tomcat 3.0. We had the same problem with Tomcat
3.0/Nt 4.0.
We made the following workaround (three commented lines) in the
org.apache.tomcat.util.MimeHeaders class and it works well :

protected MimeHeaderField putHeader(String name) {
//  if (containsHeader(name)) {
//     removeHeader(name);
// }
return addHeader(name);
}

You can try Tomcat 3.1 beta : this bug is fixed. Or wait for the 3.1 :
it's warm !!!

Christian


Gert Koning a �crit :

> Hi all
>
> This is a repost, as the previous post went under the wrong subject.
>
> I can not write more than one cookie with a servlet. No matter how many
> cookies I
> add, only the LAST one gets sent to the browser. The API docs state clearly
> that addCookie() can be called multiple times for a reponse object.
>
> I am using Tomcat 3.0 on Linux.
>
> My code looks like this:
>
> Cookie firstCookie = new Cookie("cookie1", "string1");
> firstCookie.setPath("/");
> res.addCookie(firstCookie);
> Cookie secondCookie = new Cookie("cookie2", "string2");
> secondCookie.setPath("/");
> res.addCookie(secondCookie);
>
> Any suggestions?
>
> Gert Koning
> University of South Africa
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to