|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.servlet.Cookies
Static convenience methods for dealing with cookies. http://wp.netscape.com/newsref/std/cookie_spec.html http://www.faqs.org/rfcs/rfc2109.html
HttpServletRequest.getCookies()
Field Summary | |
static String |
versionId
|
Method Summary | |
static void |
delete(javax.servlet.http.HttpServletResponse sresp,
String name)
Deletes the named cookie by setting its maximum age to 0. |
static javax.servlet.http.Cookie |
get(javax.servlet.http.HttpServletRequest sreq,
String name)
Gets the cookie whose name is name from the
request. |
static String |
getValue(javax.servlet.http.HttpServletRequest sreq,
String name)
Gets the String value of a cookie with
name from the request object sreq . |
static javax.servlet.http.Cookie |
set(javax.servlet.http.HttpServletResponse sresp,
String name,
String value)
Sets a session cookie on the response. |
static javax.servlet.http.Cookie |
set(javax.servlet.http.HttpServletResponse sresp,
String name,
String value,
int expiry)
Sets a cookie on the response with the given expiration time. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Method Detail |
public static final javax.servlet.http.Cookie get(javax.servlet.http.HttpServletRequest sreq, String name)
name
from the
request. If there is no such cookie, we return null.
sreq
- The request from which to fetch the cookiename
- The String
key to use to look up the
cookie
Cookie
whose name is name
or null if there is no such cookiepublic static final String getValue(javax.servlet.http.HttpServletRequest sreq, String name)
String
value of a cookie with
name
from the request object sreq
.
If there is no such cookie, null
is returned.
sreq
- The request objectname
- The String
name of the cookie to look
for
String
value of the cookie or
null
if it is not present on sreq
public static final javax.servlet.http.Cookie set(javax.servlet.http.HttpServletResponse sresp, String name, String value, int expiry)
Cookie.Cookie(String, String)
. The cookie
object is returned to allow custom settings.
sresp
- The response objectname
- The String
name of the cookie to setvalue
- The String
value of the cookie to set
Cookie
instance created and set by
this methodpublic static final javax.servlet.http.Cookie set(javax.servlet.http.HttpServletResponse sresp, String name, String value)
Cookie.Cookie(String, String)
. The cookie
object is returned to allow custom settings.
sresp
- The response objectname
- The String
name of the cookie to setvalue
- The String
value of the cookie to set
Cookie
instance created and set by
this methodpublic static final void delete(javax.servlet.http.HttpServletResponse sresp, String name)
sresp
- The response objectname
- The String
name of the cookie to
delete
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |