3 Replies Latest reply: Aug 29, 2012 5:55 AM by ramp RSS

    unable to set max for cookie

    819867
      hai <br>
      actually i am working on java ee6 web application i tried to set value and max age for the cookie...but i was uanble to set maxage what ever the max age value i give .it shows as -1.but my browser accepts and stores cookie.<br><br>
      <i>
      "
      Cookie sa=new Cookie("ssample", "welcome");
      sa.setMaxAge(120);
      response.addCookie(sa);
      "</i>