com.bea.apps.groupspace.util
Class CookieHelper

java.lang.Object
  extended by com.bea.apps.groupspace.util.CookieHelper

public class CookieHelper
extends Object


Constructor Summary
CookieHelper()
           
 
Method Summary
static void addLongLivedCookie(String cookieName, String cookieValue, HttpServletResponse response)
           
static void addSessionCookie(String cookieName, String cookieValue, HttpServletResponse response)
           
static Cookie getCookie(Cookie[] cookies, String cookieName)
          Given an array of cookies and a name, this method tries to find and return the cookie from the array that has the given name.
static String getCookieValue(Cookie[] cookies, String cookieName, String defaultValue)
          Given an array of Cookies, a name, and a default value, this method tries to find the value of the cookie with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieHelper

public CookieHelper()
Method Detail

getCookieValue

public static String getCookieValue(Cookie[] cookies,
                                    String cookieName,
                                    String defaultValue)
Given an array of Cookies, a name, and a default value, this method tries to find the value of the cookie with the given name. If there is no cookie matching the name in the array, then the default value is returned instead.


getCookie

public static Cookie getCookie(Cookie[] cookies,
                               String cookieName)
Given an array of cookies and a name, this method tries to find and return the cookie from the array that has the given name. If there is no cookie matching the name in the array, null is returned.


addLongLivedCookie

public static void addLongLivedCookie(String cookieName,
                                      String cookieValue,
                                      HttpServletResponse response)

addSessionCookie

public static void addSessionCookie(String cookieName,
                                    String cookieValue,
                                    HttpServletResponse response)


Copyright © 2006 BEA Systems, Inc. All Rights Reserved