This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

JavaRanch » Java Forums » Products » Tomcat
Bookmark "cookie value set problem" Watch "cookie value set problem" New topic

cookie value set problem

ethem narman

Joined: Oct 16, 2008
Posts: 12

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

//some loop code

// 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?

Consider Paul's rocket mass heater.
subject: cookie value set problem
It's not a secret anymore!