java cookie
public static void AddCookie(HttpServletResponse response, String key, String value) { Cookie cookie = new Cookie(key, value); response.addCookie(cookie); }
如果是中文,需要对key值或者value值进行URLEncoder.encode(Name, "utf-8")进行编码。
欢迎指正:haizi2014@qq.com