com.arsdigita.util
Class ServletUtils
java.lang.Object
com.arsdigita.util.ServletUtils
- public class ServletUtils
- extends Object
A (static) class of generally-useful Java servlet utilities.
- Author:
- Bill Schneider
Method Summary |
static String |
exportURLVars(javax.servlet.http.HttpServletRequest req,
String vars)
Returns a string that can be appended to a URL as a query string. |
static String |
getCookieValue(javax.servlet.http.HttpServletRequest request,
String withName)
Returns a cookie value as a String, given a cookie name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
versionId
public static final String versionId
- See Also:
- Constant Field Values
exportURLVars
public static final String exportURLVars(javax.servlet.http.HttpServletRequest req,
String vars)
- Returns a string that can be appended to a URL as a query string.
This exports URL variables and their values in the current request to
for use in a new request.
If request contains the variables
"one"=1, "two"=2, and "three"=3, then exportURLVars(req, "one two")
will return "one=1&two=2".
- Parameters:
req
- the HttpServletRequestvars
- a space-separated list of variables to export. If vars
is null, export all available.
getCookieValue
public static final String getCookieValue(javax.servlet.http.HttpServletRequest request,
String withName)
- Returns a cookie value as a String, given a cookie name.
- Parameters:
request
- The servlet requestwithName
- The cookie name
- Returns:
- The cookie value
- See Also:
Cookie
,
HttpServletRequest.getCookies()
Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC