org.appfuse.webapp.util
Class RequestUtil

java.lang.Object
  extended by org.appfuse.webapp.util.RequestUtil

public class RequestUtil
extends Object

Convenience class for setting and retrieving cookies.


Constructor Summary
RequestUtil()
           
 
Method Summary
static void deleteCookie(HttpServletResponse response, Cookie cookie, String path)
          Convenience method for deleting a cookie by name
static String getAppURL(HttpServletRequest request)
          Convenience method to get the application's URL based on request variables.
static Cookie getCookie(HttpServletRequest request, String name)
          Convenience method to get a cookie by name
static void setCookie(HttpServletResponse response, String name, String value, String path)
          Convenience method to set a cookie
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestUtil

public RequestUtil()
Method Detail

setCookie

public static void setCookie(HttpServletResponse response,
                             String name,
                             String value,
                             String path)
Convenience method to set a cookie

Parameters:
response -
name -
value -
path -

getCookie

public static Cookie getCookie(HttpServletRequest request,
                               String name)
Convenience method to get a cookie by name

Parameters:
request - the current request
name - the name of the cookie to find
Returns:
the cookie (if found), null if not found

deleteCookie

public static void deleteCookie(HttpServletResponse response,
                                Cookie cookie,
                                String path)
Convenience method for deleting a cookie by name

Parameters:
response - the current web response
cookie - the cookie to delete
path - the path on which the cookie was set (i.e. /appfuse)

getAppURL

public static String getAppURL(HttpServletRequest request)
Convenience method to get the application's URL based on request variables.



Copyright � 2002-2006