public class CookieTools extends Object
| 构造器和说明 |
|---|
CookieTools() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addCookie(javax.servlet.http.HttpServletResponse response,
String cookieName,
String cookieValue,
String path,
Integer date)
新增cookie
|
static void |
deleteCookie(javax.servlet.http.HttpServletRequest request,
String cookieName)
删除Cookie
|
static String |
getCookieValue(javax.servlet.http.HttpServletRequest request,
String cookieName)
根据cookie名称 ,获取cookie值
|
public static void addCookie(javax.servlet.http.HttpServletResponse response,
String cookieName,
String cookieValue,
String path,
Integer date)
response - the responsecookieName - the cookie namecookieValue - the cookie valuepath - the pathdate - the datepublic static String getCookieValue(javax.servlet.http.HttpServletRequest request, String cookieName)
request - the requestcookieName - the cookie namepublic static void deleteCookie(javax.servlet.http.HttpServletRequest request,
String cookieName)
request - the requestcookieName - the cookie nameCopyright © 2020. All rights reserved.