title: How to persist a cookie?
body: <p>I am creating a cookie in a jsp script, which is located at:</p>
  
  <pre><code>www.myproject.com/login/index.jsp
  </code></pre>
  
  <p>if I restart the browser and navigate there, all works well, I can see the cookie persist. If I navigate to:</p>
  
  <pre><code>www.myproject.com
  </code></pre>
  
  <p>I am not seeing the cookie. Do I need to set something in the cookie path or domain to make the cookie visible to the entire [myproject.com] domain (I just want to access the cookie from whatever sub path the user may be on). I am creating the cookie like:</p>
  
  <pre><code>Cookie c = new Cookie("thisisatest", "foo");
  c.setMaxAge(60 * 24 * 3600);
  response.addCookie(c);
  </code></pre>
  
  <p>Thanks</p>