December 2000
Intermediate to advanced
574 pages
17h 3m
English
CookieUtils
|
Class Name: |
com.ora.jsp.util.CookieUtils |
|
Extends: |
None |
|
Implements: |
None |
The CookieUtils
class contains a number of static methods
that can be used to work with
javax.servlet.http.Cookie objects.
public class CookieUtils {
// Methods
public static String getCookieValue(String name,
javax.servlet.http.HttpServletRequest req);
public static boolean isCookieSet(String name,
javax.servlet.http.HttpServletRequest req);
public static void sendCookie(String name, String value,
int maxAge, javax.servlet.http.HttpServletResponse res);
}public static String getCookieValue(String name, javax.servlet.http.HttpServletRequest req)
Returns the value of the cookie with the specified name, or
null if not found.
public static boolean isCookieSet(String name, javax.servlet.http.HttpServletRequest req)
Returns true if a cookie with the specified name
is present in the request.
public static void sendCookie(String name, String value, int maxAge, javax.servlet.http.HttpServletResponse res)
Creates a cookie with the specified name, value, and max age, and adds it to the response.
Read now
Unlock full access