code: public static String getCookieValue (HttpServletRequest req, String name)
      {
          Cookie c = getCookie(req, name);
          return (c == null) ? null : c.getValue();
      }
docs: Get the value of the cookie for the cookie of the specified name, or null if not found.