public class ECookie extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
MAX_AGE_HALF_HOUR |
static int |
MAX_AGE_MONTH |
static int |
MAX_AGE_WEEK |
static int |
MAX_AGE_YEAR |
| 构造器和说明 |
|---|
ECookie() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
getCookie(javax.servlet.http.HttpServletRequest request,
String name)
获取指定name的Cookie值
|
static void |
removeCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String name)
删除指定name的Cookie
|
static void |
setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
int maxValues,
TimeUnit unit)
添加Cookie
|
public static final int MAX_AGE_HALF_HOUR
public static final int MAX_AGE_WEEK
public static final int MAX_AGE_MONTH
public static final int MAX_AGE_YEAR
public static void setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
int maxValues,
TimeUnit unit)
response - name - value - maxValues - public static String getCookie(javax.servlet.http.HttpServletRequest request, String name)
response - name - public static void removeCookie(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String name)
request - name - Copyright © 2020. All rights reserved.