public class ServletUtil
extends java.lang.Object
Constructor and Description |
---|
ServletUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getQueryStringParameter(java.lang.String theQueryString,
java.lang.String theParameter)
A substitute method for
HttpServletRequest.getParameter() . |
public static java.lang.String getQueryStringParameter(java.lang.String theQueryString, java.lang.String theParameter)
HttpServletRequest.getParameter()
.
Contrary to getParameter()
, this method does not
access the request input stream (only the query string of the url).
Note: We use this method internally to retrieve Cactus parameters passed
by the client side. The issue with getParameter()
is that
if you use it, then you cannot call getReader()
or
getInputStream()
(see the Servlet spec). However, if we
want to allow for testing code that uses these 2 methods (and we do !)
we need to use this method to get the internal Cactus parameters.theQueryString
- the query string to parsetheParameter
- the name of the parameter to locateCopyright © 2000-2004 Apache Software Foundation. All Rights Reserved.