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.