Class: javax.servlet.ServletRequestWrapper
- public class ServletRequestWrapper
- implements ServletRequest
Provides a convenient implementation of the ServletRequest interface that
can be subclassed by developers wishing to adapt the request to a Servlet.
This class implements the Wrapper or Decorator pattern. Methods default to
calling through to the wrapped request object.
Methods
-
ServletRequestWrappertop
public ServletRequestWrapper(ServletRequest request)Creates a ServletRequest adaptor wrapping the given request object. -
getAttributetop
The default behavior of this method is to call getAttribute(String name) on the wrapped request object.- Specified by:
- getAttribute from ServletRequest
-
getAttributeNamestop
public Enumeration getAttributeNames()The default behavior of this method is to return getAttributeNames() on the wrapped request object.- Specified by:
- getAttributeNames from ServletRequest
-
getCharacterEncodingtop
public String getCharacterEncoding()The default behavior of this method is to return getCharacterEncoding() on the wrapped request object.- Specified by:
- getCharacterEncoding from ServletRequest
-
getContentLengthtop
public int getContentLength()The default behavior of this method is to return getContentLength() on the wrapped request object.- Specified by:
- getContentLength from ServletRequest
-
getContentTypetop
public String getContentType()The default behavior of this method is to return getContentType() on the wrapped request object.- Specified by:
- getContentType from ServletRequest
-
getInputStreamtop
public ServletInputStream getInputStream() throws IOExceptionThe default behavior of this method is to return getInputStream() on the wrapped request object.- Specified by:
- getInputStream from ServletRequest
-
getLocalAddrtop
public String getLocalAddr()The default behavior of this method is to return getLocalAddr() on the wrapped request object.- Specified by:
- getLocalAddr from ServletRequest
-
getLocalNametop
public String getLocalName()The default behavior of this method is to return getLocalName() on the wrapped request object.- Specified by:
- getLocalName from ServletRequest
-
getLocalPorttop
public int getLocalPort()The default behavior of this method is to return getLocalPort() on the wrapped request object.- Specified by:
- getLocalPort from ServletRequest
-
getLocaletop
public Locale getLocale()The default behavior of this method is to return getLocale() on the wrapped request object.- Specified by:
- getLocale from ServletRequest
-
getLocalestop
public Enumeration getLocales()The default behavior of this method is to return getLocales() on the wrapped request object.- Specified by:
- getLocales from ServletRequest
-
getParametertop
The default behavior of this method is to return getParameter(String name) on the wrapped request object.- Specified by:
- getParameter from ServletRequest
-
getParameterMaptop
public Map getParameterMap()The default behavior of this method is to return getParameterMap() on the wrapped request object.- Specified by:
- getParameterMap from ServletRequest
-
getParameterNamestop
public Enumeration getParameterNames()The default behavior of this method is to return getParameterNames() on the wrapped request object.- Specified by:
- getParameterNames from ServletRequest
-
getParameterValuestop
The default behavior of this method is to return getParameterValues(String name) on the wrapped request object.- Specified by:
- getParameterValues from ServletRequest
-
getProtocoltop
public String getProtocol()The default behavior of this method is to return getProtocol() on the wrapped request object.- Specified by:
- getProtocol from ServletRequest
-
getReadertop
public BufferedReader getReader() throws IOExceptionThe default behavior of this method is to return getReader() on the wrapped request object.- Specified by:
- getReader from ServletRequest
-
getRealPathtop
The default behavior of this method is to return getRealPath(String path) on the wrapped request object.- Specified by:
- getRealPath from ServletRequest
-
getRemoteAddrtop
public String getRemoteAddr()The default behavior of this method is to return getRemoteAddr() on the wrapped request object.- Specified by:
- getRemoteAddr from ServletRequest
-
getRemoteHosttop
public String getRemoteHost()The default behavior of this method is to return getRemoteHost() on the wrapped request object.- Specified by:
- getRemoteHost from ServletRequest
-
getRemotePorttop
public int getRemotePort()The default behavior of this method is to return getRemotePort() on the wrapped request object.- Specified by:
- getRemotePort from ServletRequest
-
getRequesttop
public ServletRequest getRequest()Return the wrapped request object. -
getRequestDispatchertop
public RequestDispatcher getRequestDispatcher(String path)The default behavior of this method is to return getRequestDispatcher(String path) on the wrapped request object.- Specified by:
- getRequestDispatcher from ServletRequest
-
getSchemetop
public String getScheme()The default behavior of this method is to return getScheme() on the wrapped request object.- Specified by:
- getScheme from ServletRequest
-
getServerNametop
public String getServerName()The default behavior of this method is to return getServerName() on the wrapped request object.- Specified by:
- getServerName from ServletRequest
-
getServerPorttop
public int getServerPort()The default behavior of this method is to return getServerPort() on the wrapped request object.- Specified by:
- getServerPort from ServletRequest
-
isSecuretop
public boolean isSecure()The default behavior of this method is to return isSecure() on the wrapped request object.- Specified by:
- isSecure from ServletRequest
-
removeAttributetop
public void removeAttribute(String name)The default behavior of this method is to call removeAttribute(String name) on the wrapped request object.- Specified by:
- removeAttribute from ServletRequest
-
setAttributetop
The default behavior of this method is to return setAttribute(String name, Object o) on the wrapped request object.- Specified by:
- setAttribute from ServletRequest
-
setCharacterEncodingtop
public void setCharacterEncoding(String enc) throws UnsupportedEncodingExceptionThe default behavior of this method is to set the character encoding on the wrapped request object.- Specified by:
- setCharacterEncoding from ServletRequest
-
setRequesttop
public void setRequest(ServletRequest request)Sets the request object being wrapped.
