Hello,
I am trying to set a cookie value in my JSP page and I just can't seem to get
it to write to the cookie file.  Here is what Im doing:

Cookie[] cookie = request.getCookies();
for(int counter = 0;counter < cookie.length;counter++) {
  if(cookie[counter].getName().equals("foo")) {
     cookie[counter].setValue("1234");
  }
}

When I  retrieve the value immediately after setting it, using getValue() it
returns me the correct value which i set (1234), however when i look in the
cookie file it has not been set.  And of course when i move onto other pages
and check the value it has not been set, it still displays its old value.

One note on this is that the cookie value already exists and so im trying to
overwrite it with this new value....though i doubt this should be the problem.

Any help would be appreciated. Thanks in advance.

Rostom


__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

===========================================================================
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