code: protected String checkLogOut(final HttpServletRequest request,
                                 final UtilActionForm form)
                 throws Throwable {
      final String reqUser = request.getRemoteUser();
  
      final boolean forceLogout =
              !Util.equalsString(reqUser, form.getCurrentUser());
  
      final String temp = request.getParameter(requestLogout);
  
  
      if (forceLogout || (temp != null)) {
        final HttpSession sess = request.getSession(false);
  
        if ((sess != null) && logOutCleanup(request, form)) {
          sess.invalidate();
        }
        return forwardLoggedOut;
      }
  
      return null;
    }
docs: Check for logout request.
  
  @param request    HttpServletRequest
  @param form
  @return null for continue, forwardLoggedOut to end session.
  @throws Throwable