code: public void removeSessionAttr(final String attrName) {
      final HttpSession sess = request.getSession(false);
  
      if (sess == null) {
        return;
      }
  
      sess.removeAttribute(attrName);
    }
docs: Remove a named session attribute.
  
  @param attrName    Name of the attribute