Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.webapp.util
Class RequestUtil

    java.lang.Object
      com.gisgraphy.webapp.util.RequestUtil

    public final class RequestUtil

extends java.lang.Object

Convenience class for setting and retrieving cookies.

Method Summary
`static void` | `deleteCookie(javax.servlet.http.HttpServletResponse response, javax.servlet.http.Cookie cookie, java.lang.String path)` Convenience method for deleting a cookie by name
`static java.lang.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, java.lang.String name)` Convenience method to get a cookie by name
`static void` | `setCookie(javax.servlet.http.HttpServletResponse response, java.lang.String name, java.lang.String value, java.lang.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`

Method Detail

### setCookie

    public static void setCookie(javax.servlet.http.HttpServletResponse response,
                                 java.lang.String name,
                                 java.lang.String value,
                                 java.lang.String path)

  Convenience method to set a cookie

  Parameters:
    `response` - the current response
    `name` - the name of the cookie
    `value` - the value of the cookie
    `path` - the path to set it on

### getCookie

    public static javax.servlet.http.Cookie getCookie(javax.servlet.http.HttpServletRequest request,
                                                      java.lang.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(javax.servlet.http.HttpServletResponse response,
                                    javax.servlet.http.Cookie cookie,
                                    java.lang.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 java.lang.String getAppURL(javax.servlet.http.HttpServletRequest request)

  Convenience method to get the application's URL based on request variables.

  Parameters:
    `request` - the current request
  Returns:
    URL to application

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.