I'm working on a website that runs on Tomcat 6.0 at localhost:8080. Interestingly enough, Tomcat seems to only be able to set cookies on Firefox. Opera and WebKit based browsers (Chrome, WinSafari) seem to fail. Is this a known issue and is there a solution?
+1
A:
So the problem was we were using a blank string as our cookie domain value. This works in Firefox. I had tried changing the base to locahost and 127.0.0.1 but that hadn't worked previously. There are two reasons for this: the cookies spec requires domains to have 2 or 3 dots in them (hence localhost shouldn't technically work, even though it's aliased). Also, the app host base was localhost:8080, and it's been changed to 127.0.0.1:8080. This satisfies the same domain condition.
Karan
2010-03-30 07:30:17