wood burning stoves 2.0*
The moose likes Tomcat and the fly likes cookie value set problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "cookie value set problem" Watch "cookie value set problem" New topic
Author

cookie value set problem

ethem narman
Greenhorn

Joined: Oct 16, 2008
Posts: 12
Hello,

In a filter I am accessing cookies and trying to set the value of JSESSIONID cookie with

//some loop code

cookie.setValue("somevalue");
// response.addCookie(cookie);

My problem is if I use it as above new value is NOT set, when I uncomment addCookie function, I get an additional cookie called JSESSIONID again. I do not want to have an additional one but just update the old one.
I've read Tough Cookie thread but I could not see any solution.
So how do I JUST update a cookie without getting an additional one?
thanks.

aysan
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: cookie value set problem
 
Similar Threads
Removing authorization data from browser.
how to send session info from Applet to servlet?
tomcat session handling
(B&S) Write operations synchronization
what's the security issue about cookie ?