title: Can't remove JSESSIONID cookie
body: <p>I am using a Spring controller with a HttpServletRequest and response to remove cookies.</p>
  
  <p>When I need to remove the cookie, I have this code:</p>
  
  <pre><code>   Cookie[] allCookies = request.getCookies();
  
  for (int i = 0; i &lt; allCookies.length; i++)
  {
     String name = allCookies[i].getName();
     if (name.equalsIgnoreCase("JSESSIONID"))
     {
      logger.info(i + " Name=" + name + " Value=" + allCookies[i].getValue());
      cookieToDelete = allCookies[i];
      cookieToDelete.setValue("");
      cookieToDelete.setMaxAge(0);
      cookieToDelete.setVersion(0);
      cookieToDelete.setPath("/");
      response.addCookie(cookieToDelete);
     }
  }
  </code></pre>
  
  <p>After this execution, all cookies with the name JSESSIONID should be removed.
  What is my mistake?</p>