|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pebble.util.CookieUtils
public class CookieUtils
Utilities for finding and manipulating cookies.
Field Summary | |
---|---|
static int |
ONE_MONTH
represents 4 weeks in seconds |
Constructor Summary | |
---|---|
CookieUtils()
|
Method Summary | |
---|---|
static void |
addCookie(HttpServletResponse response,
java.lang.String name,
java.lang.String value,
int maxAge)
Adds a cookie with the specified name, value and expiry. |
static Cookie |
getCookie(Cookie[] cookies,
java.lang.String name)
Gets a reference to a named cookie from an array of cookies. |
static void |
removeCookie(HttpServletResponse response,
java.lang.String name)
Removes a cookie with the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ONE_MONTH
Constructor Detail |
---|
public CookieUtils()
Method Detail |
---|
public static Cookie getCookie(Cookie[] cookies, java.lang.String name)
cookies
- an array of cookiesname
- the name of the cookie to find
public static void addCookie(HttpServletResponse response, java.lang.String name, java.lang.String value, int maxAge)
response
- the HttpServletResponse to add the cookie toname
- the name of the cookievalue
- the value of the cookiemaxAge
- the maxAge of the cookie (in seconds)public static void removeCookie(HttpServletResponse response, java.lang.String name)
response
- the HttpServletResponse to remove the cookie fromname
- the name of the cookie
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |