title: what's the deal with Cookie.setMaxAge(Integer.MAX_VALUE)?
body: <p><a href="http://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge%28int%29" rel="noreferrer">setMaxAge</a> is supposed to control the maximum age of a cookie, so if my intention is to literally set the maximum age possible the logical thing would be doing:</p>
  
  <pre><code>cookie.setMaxAge(Integer.MAX_VALUE);
  </code></pre>
  
  <p>However this results in no <code>Expires</code> in cookie HTTP header at all, I'm testing it on a WebSphere 7. Setting it to something like 1 year measured in seconds works fine.</p>
  
  <p>Why is that happening?</p>
  
  <p>PS
  Have just tested on Tomcat7 - Integer.MAX_VALUE results in <code>Max-Age=2147483647; Expires=Wed, 06-Mar-2080 21:30:32 GMT</code>, so it must be something wrong with WebSphere.</p>