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