org.blojsom.util
Class CookieUtils

java.lang.Object
  extended byorg.blojsom.util.CookieUtils

public class CookieUtils
extends java.lang.Object

CookieUtils

Since:
blojsom 2.03
Version:
$Id: CookieUtils.java,v 1.4 2006/01/04 16:59:54 czarneckid Exp $
Author:
David Czarnecki

Constructor Summary
CookieUtils()
           
 
Method Summary
static void addCookie(javax.servlet.http.HttpServletResponse httpServletResponse, int cookieExpiration, java.lang.String cookieKey, java.lang.String cookieValue)
          Add a cookie with a key and value to the response
static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest httpServletRequest, java.lang.String cookieKey)
          Return a cookie given a particular key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CookieUtils

public CookieUtils()
Method Detail

getCookie

public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest httpServletRequest,
                                                  java.lang.String cookieKey)
Return a cookie given a particular key

Parameters:
httpServletRequest - Request
cookieKey - Cookie key
Returns:
Cookie of the requested key or null if no cookie under that name is found

addCookie

public static void addCookie(javax.servlet.http.HttpServletResponse httpServletResponse,
                             int cookieExpiration,
                             java.lang.String cookieKey,
                             java.lang.String cookieValue)
Add a cookie with a key and value to the response

Parameters:
httpServletResponse - Response
cookieKey - Cookie key
cookieValue - Cookie value