find cookie from request
@param request current request
@param name cookie name
@return cookie value or null
506970
public static Cookie findCookie(HttpServletRequest request, String name) {
        if (request != null) {
            Cookie[] cookies = request.getCookies();
            if (cookies != null && cookies.length > 0) {
                for (Cookie cookie : cookies) {
                    if (cookie.getName().equals(name)) {
                        return cookie;
                    }
                }
            }
        }
        return null;
    }
129526
public static String getCookieUsername(HttpServletRequest request) {
		String username = CookieUtil.getCookie("username", request);
		try {
			username = URLDecoder.decode(username, "UTF-8");
		}
		catch (UnsupportedEncodingException e) {
			throw new RuntimeException(e.getMessage(), e);
		}
		return username;
	}
360698
public HttpCookie getCookie(String name) {
        if (null == name || 0 == this.parsedList.size()) {
            return null;
        }
        for (HttpCookie cookie : this.parsedList) {
            if (cookie.getName().equals(name)) {
                return cookie;
            }
        }
        return null;
    }
1097554
public static boolean removeCookie(String name, HttpServletRequest request, HttpServletResponse response) {
        return removeCookie(name, request.getCookies(), response);
    }
771815
public function getCookie($name)
    {
        if (!$this->_cookies->has($name)) {
            return null;
        }

        $cookie = $this->_cookies->get($name);

        return $this->convertCookieToArray($cookie);
    }
456595
public static Object getComponentInstance(String name, HttpServletRequest request) {
		ServletContext sc = request.getSession().getServletContext();
		ContainerWrapper containerWrapper = scf.findContainer(new ServletContextWrapper(sc));
		if (!containerWrapper.isStart()) {
			Debug.logError("JdonFramework not yet started, please try later ", module);
			return null;
		}
		return containerWrapper.lookup(name);
	}
229046
private void parseIDFromCookies(RequestMessage request) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Looking for ID in cookies");
        }
        Enumeration<String> list = request.getHeaders("Cookie");
        while (list.hasMoreElements()) {
            String item = list.nextElement();
            int index = item.indexOf(getSessionConfig().getIDName());
            if (-1 != index) {
                index = item.indexOf('=', index);
                if (-1 != index) {
                    index++;
                    // TODO this is assuming that the full value is valid and
                    // grabbing just the 4 digit id...
                    if (item.length() >= (index + 4)) {
                        this.id = item.substring(index, index + 4);
                        this.fromCookie = true;
                        break;
                    }
                }
            }
        }
    }
1019245
public function getCookie(string $name) : ?string
    {
        return (($this->cookies->has($name) === true) ? $this->cookies->get($name)->getValue() : null);
    }
108615
public String getCookieValue(String name) {
		HttpCookie cookie = getCookie(name);
		return (null == cookie) ? null : cookie.getValue();
	}
509126
public function get($name)
    {
        $cookie = $this->request->getCookieParams();

        return array_key_exists($name, $cookie) ? $cookie[$name] : null;
    }
634410
public final static Map<String, Cookie> readCookieMap(HttpServletRequest httpServletRequest) {
		Map<String, Cookie> cookieMap = new HashMap<String, Cookie>();
		Cookie[] cookies = httpServletRequest.getCookies();
		if (null == cookies) {
			return null;
		}
		for (Cookie cookie : cookies) {
			cookieMap.put(cookie.getName().toLowerCase(), cookie);
		}
		return cookieMap;
	}
311077
function(name) {
          if (document.cookie !== lastCookieString) {
            lastCookieString = document.cookie;
            cookies = cookie.parse(lastCookieString, defaultOptions);
          }

          return cookies[name];
        }
1081459
public YokeCookie getCookie(@NotNull final String name) {
        if (cookies != null) {
            for (YokeCookie c : cookies) {
                if (name.equals(c.name())) {
                    return c;
                }
            }
        }
        return null;
    }
1236779
public Cookie get(String name, String domain) {
		for(Cookie cookie : this) {
			if(cookie.getName().equals(name) && cookie.getDomain().equals(domain))
				return cookie; 
		}
		return null;
	}
420315
public static Integer getIntegerParameter(final HttpServletRequest request, final String name) {
		String value = request.getParameter(name);
		if (StringUtils.isBlank(value)) {
			return null;
		}
		return Integer.valueOf(value);
	}
852733
public static Cookie getCookie(String name, Cookie[] cookies) {
        if (Checker.isNotEmpty(cookies)) {
            for (Cookie cookie : cookies) {
                if (name.equals(cookie.getName())) {
                    return cookie;
                }
            }
        }
        return null;
    }
1006873
protected String cookieValue(String name){
        Cookie cookie = cookie(name);
        return cookie != null ? cookie.getValue() : null;
    }