写:
  Cookie userCookie = new Cookie("user", "uid1234");
  response.addCookie(userCookie);
读:
  public static String getCookieValue(Cookie[] cookies,
               String cookieName,
               String defaultValue) {
    for(int i=0; i<cookies.length; i++) {
      Cookie cookie = cookies[i];
      if (cookieName.equals(cookie.getName()))
        return(cookie.getValue());
    }
    return(defaultValue);
  }