Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public final class Cookies extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addCookie(HttpServletRequest request,
HttpServletResponse response,
String cookieName,
String value,
String comment,
int maxAge,
boolean secure,
boolean contextOnlyPath)
Adds a cookie.
|
static String |
getCookie(HttpServletRequest request,
String cookieName)
Gets a cookie value given its name or
null if not found. |
static void |
removeCookie(HttpServletRequest request,
HttpServletResponse response,
String cookieName,
boolean secure,
boolean contextOnlyPath)
Removes a cookie by adding it with maxAge of zero.
|
public static void addCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String value, String comment, int maxAge, boolean secure, boolean contextOnlyPath)
public static String getCookie(HttpServletRequest request, String cookieName)
null if not found.public static void removeCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, boolean secure, boolean contextOnlyPath)
Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.