code: public static void removeSessionValue(HttpServletRequest request, String key) {
  
          HttpSession session = request.getSession(true);
          session.removeAttribute(key);
      }
docs: Removes an object from the session of the given http request.<p>
  
  A session will be initialized if the request does not currently have a session.
  As a result, the request will always have a session after this method has been called.<p>
  
  @param request the request to get the session from
  @param key the key of the object to be removed from the session