I'm working on a small project with java servlets/jstl
I've created a login with a session and I want the browser to keep that session even after a browserrestart.
I've written this code:
HttpSession session=request.getSession();
session.setMaxInactiveInterval(604800);
session.setAttribute("loggedOnUser", true);
I've set the session timeout to a week. But whenever I close the browser and reopen it I need to login again. When I look at the cookies of my browser, the cookie that contains the sessionId still expires when the browser closes. I thought "setMaxInactiveInterval" would change that to one week. Does anyone know what the problem is?