I’m writing my first GWT application and i’m at the point of implementing sessions.
Currently i’ generating a
HttpServletRequest request = getThreadLocalRequest();
HttpSession httpSession = request.getSession(true);
httpSession.setMaxInactiveInterval(1000 * 60 * 2);//2min
and then verifying that the session is the same as the users via RPC call to server before displaying any screen
HttpServletRequest request = getThreadLocalRequest();
HttpSession httpSession = request.getSession(false);
if(user.getSessionId().equals(result.getSessionId()))
//display screen
My question is concerning setMaxInactiveInterval(); the inactive timeout doesn’t seem to work for me at all – the session doesnt expire on its own after two mins
Am i going about it the right way? Thanks.
p.s. i used this as a jump off: http://snipt.net/javagner/session-in-gwt/
Usually there is this in the web.xml