public class RequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
Modifier | Constructor and Description |
---|---|
protected |
RequestWrapper(javax.servlet.http.HttpServletRequest request) |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(java.lang.String name,
java.lang.String value)
Add a parameter.
|
void |
addParameter(java.lang.String name,
java.lang.String[] values)
Add a parameter with several values.
|
java.lang.String |
getParameter(java.lang.String name) |
java.util.Map<java.lang.String,java.lang.String[]> |
getParameterMap() |
java.util.Enumeration<java.lang.String> |
getParameterNames() |
java.lang.String[] |
getParameterValues(java.lang.String name) |
void |
removeParameter(java.lang.String name)
Removes a parameter.
|
void |
setParameter(java.lang.String name,
java.lang.String value) |
void |
setParameter(java.lang.String name,
java.lang.String[] values) |
static RequestWrapper |
wrap(javax.servlet.http.HttpServletRequest request)
Returns a
RequestWrapper instance. |
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
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocale, getLocales, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
protected RequestWrapper(javax.servlet.http.HttpServletRequest request)
public static RequestWrapper wrap(javax.servlet.http.HttpServletRequest request)
RequestWrapper
instance. If the request is already an
instance of RequestWrapper
this method will not create a new, but
instead cast the current instance and return that.request
- The request.RequestWrapper
instance.public java.lang.String getParameter(java.lang.String name)
getParameter
in interface javax.servlet.ServletRequest
getParameter
in class javax.servlet.ServletRequestWrapper
public java.util.Map<java.lang.String,java.lang.String[]> getParameterMap()
getParameterMap
in interface javax.servlet.ServletRequest
getParameterMap
in class javax.servlet.ServletRequestWrapper
public java.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames
in interface javax.servlet.ServletRequest
getParameterNames
in class javax.servlet.ServletRequestWrapper
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface javax.servlet.ServletRequest
getParameterValues
in class javax.servlet.ServletRequestWrapper
public void setParameter(java.lang.String name, java.lang.String value)
name
- value
- public void setParameter(java.lang.String name, java.lang.String[] values)
name
- values
- public void addParameter(java.lang.String name, java.lang.String value)
name
- The name of the parameter.value
- The value.public void addParameter(java.lang.String name, java.lang.String[] values)
name
- The name of the parameter.values
- The parameter's values.public void removeParameter(java.lang.String name)
name
- The name of the parameter.Copyright © Technia AB. All Rights Reserved.