Hello I can't retrieve cookie maxage it always returns -1 Creating cookie:
Cookie securityCookie = new Cookie("sec", "somevalue"); securityCookie.setMaxAge(EXPIRATION_TIME);
Cookie[] cookies = request.getCookies(); if (cookies != null) { for(int i=0; i<cookies.length; i++) { ...
i have a test like this : cookie.jsp:
<html> <head> </head> <body> <% String cookieName="SNS"; Cookie cookie=new Cookie(cookieName, "maxAgeTest"); cookie.setMaxAge(60*60); response.addCookie(cookie); %> </body> </html>