code: public static String getCookieValue(HttpServletRequest req, String name) {
  		if (StringUtils.isBlank(name) || req == null) {
  			return null;
  		}
  		Cookie[] cookies = req.getCookies();
  		if (cookies == null) {
  			return null;
  		}
  		//Otherwise, we have to do a linear scan for the cookie.
  		for (Cookie cookie : cookies) {
  			if (cookie.getName().equals(name)) {
  				return cookie.getValue();
  			}
  		}
  		return null;
  	}
docs: Reads a cookie.
  @param name the name
  @param req HTTP request
  @return the cookie value