code: public static String getCookieValue(String name, HttpServletRequest request) {
          Cookie cookie = getCookie(name, request);
          if (cookie != null) {
              return cookie.getValue();
          } else {
              return null;
          }
      }
docs: Returns the cookie value with the given name for the given request
  
  @param name      the name of the cookie
  @param request   the request where to extract the request from
  
  @return the cookie value, or null if no cookie found