Replace the code behind the home tab with
HttpSession session = request.getSession(); if (!session.isNew()) { session.invalidate(); session = request.getSession(); }
This, however, is a bit of a weird approach. I would rather add an attribute to the session and then intercept its presence.
source share