public class CookieSupport
extends javax.servlet.http.Cookie
Constructor and Description |
---|
CookieSupport(javax.servlet.http.Cookie cookie)
复制一个cookie。
|
CookieSupport(javax.servlet.http.Cookie cookie,
String name)
复制一个cookie,修改cookie的名称。
|
CookieSupport(String name,
String value)
创建一个cookie。
|
Modifier and Type | Method and Description |
---|---|
void |
addCookie(javax.servlet.http.HttpServletResponse response)
将cookie添加到response中。
|
String |
getCookieHeaderName()
取得cookie header的名称。
|
String |
getCookieHeaderValue()
取得cookie header的值。
|
boolean |
getHttpOnly()
是否生成IE6支持的HttpOnly标记。
|
boolean |
isHttpOnly()
是否生成IE6支持的HttpOnly标记。
|
void |
setDomain(String domain) |
void |
setHttpOnly(boolean httpOnly)
是否生成IE6支持的HttpOnly标记。
|
String |
toString()
生成set-cookie header的值,即使cookie value中包含非法值,也不会报错。
|
public CookieSupport(javax.servlet.http.Cookie cookie)
public CookieSupport(javax.servlet.http.Cookie cookie, String name)
public boolean isHttpOnly()
public boolean getHttpOnly()
public void setHttpOnly(boolean httpOnly)
public void setDomain(String domain)
setDomain
in class javax.servlet.http.Cookie
public void addCookie(javax.servlet.http.HttpServletResponse response)
public String getCookieHeaderName()
public String getCookieHeaderValue() throws IllegalArgumentException
IllegalArgumentException
- 假如cookie value中包含非法值Copyright © 2006–2018 TinyGroup. All rights reserved.