/** * Tells whether the user is logged. * * @return */ public boolean isLogged() { if (session == null) { LOGGER.fine("No session, not logged in"); return false; } if (session.getAttribute(ATTR_LOGGEDIN) != null) { if (session.getAttribute(ATTR_LOGGEDIN).equals("1")) { return true; } else { LOGGER.fine("Not logging in - session attribute is NOT null"); } } else { LOGGER.fine("Not logging in - session attribute is null"); } return false; }
if (request.getSession().getAttribute(attributeName) != null) { pageHits = Integer.parseInt((String) request.getSession().getAttribute(attributeName));