|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class acts as a thin wrapper around a ServletRequest, adding several additional methods which enabled the request parameters to be modified programatically
Field Summary |
Fields inherited from interface javax.servlet.http.HttpServletRequest |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH |
Method Summary | |
void |
addParameter(String name,
String value)
Set a given parameter (note that this is backed by a hashmap, so the structure is slightly different than that of the underlying ServletRequest which allows multiple paramters with the same name). |
void |
removeAllParameters(String name)
Remove all parameters for a specified name |
void |
removeParameter(String name)
Remove the first parameter whose key matches the specified name |
void |
resetParameters()
Reset the parameter values to their original state (ie. the actual values in the request) |
void |
setMethod(String method)
Set the underlying request method. |
Methods inherited from interface javax.servlet.http.HttpServletRequest |
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole |
Methods inherited from interface javax.servlet.ServletRequest |
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding |
Method Detail |
public void setMethod(String method)
method
- the underlying request method (GET, POST, etc)public void addParameter(String name, String value)
name
- the key name for the parametervalue
- the value associated with the given keypublic void removeParameter(String name)
name
- the key name for the parameterpublic void removeAllParameters(String name)
name
- the key name for the parameterpublic void resetParameters()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |