title: Problems with retrieving the correct cookie in Java
body: <p>When I retrieve the cookies in my java servlet, all of the values from getPath() are null.</p>
  
  <p>So if a cookie with the same name is set in directory /foo, and at the root directory, I retrieve two cookies with the same exact name, but I can't differentiate them because getPath() returns null for both.</p>
  
  <p>I looked in firebug and saw that firefox was not sending anything for the path.</p>
  
  <p>My application uses a "rememberme" cookie with the path set to "/".  Everything works fine as long as there is only one cookie with name rememberme.  But if somehow another cookie gets set with the same name on a different path like /foo, then my application won't know which one is the one I set for the root.</p>
  
  <p>How can I differentiate the cookies?  Do I need to worry about a cookie existing with the same name in a subdir, or can I just assume there will be only the one I set?</p>