File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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?

I agree. Here's the link:
subject: cookie value set problem
It's not a secret anymore!