public final class RequestUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
deleteCookie(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.Cookie cookie,
String path)
Convenience method for deleting a cookie by name
|
static String |
getAppURL(javax.servlet.http.HttpServletRequest request)
Convenience method to get the application's URL based on request
variables.
|
static javax.servlet.http.Cookie |
getCookie(javax.servlet.http.HttpServletRequest request,
String name)
Convenience method to get a cookie by name
|
static void |
setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
String path)
Convenience method to set a cookie
|
public static void setCookie(javax.servlet.http.HttpServletResponse response,
String name,
String value,
String path)
response - the current responsename - the name of the cookievalue - the value of the cookiepath - the path to set it onpublic static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request,
String name)
request - the current requestname - the name of the cookie to findpublic static void deleteCookie(javax.servlet.http.HttpServletResponse response,
javax.servlet.http.Cookie cookie,
String path)
response - the current web responsecookie - the cookie to deletepath - the path on which the cookie was set (i.e. /appfuse)public static String getAppURL(javax.servlet.http.HttpServletRequest request)
request - the current requestCopyright © 2015. All rights reserved.