This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
javax.servlet.http.HttpServletRequest
| Access | Constructor and Description |
|---|---|
| public | HttpServletRequestWrapper(HttpServletRequest
the request)HttpServletRequest to be wrapped.Constructs a request object wrapping the given request. |
| Modifier and Type | Method and Description |
|---|---|
| private HttpServletRequest | |
| public boolean | authenticate(HttpServletResponse
The response)HttpServletResponse
associated with this HttpServletRequestImplements javax. |
| public String | changeSessionId()
Implements javax. |
| public String | getAuthType()
Implements javax. |
| public String | getContextPath()
Implements javax. |
| public Cookie[] | getCookies()
Implements javax. |
| public long | getDateHeader(String
a name)String specifying the
name of the headerImplements javax. |
| public String | getHeader(String
a name)String specifying the
header nameImplements javax. |
| public Enumeration | getHeaderNames()
Implements javax. |
| public Enumeration | getHeaders(String
a name)String specifying the
header nameImplements javax. |
| public HttpServletMapping | getHttpServletMapping()
Overrides default javax. The default behavior of this method is to return getServletMapping() on the wrapped request object. |
| public int | getIntHeader(String
a name)String specifying the name
of a request headerImplements javax. |
| public String | getMethod()
Implements javax. |
| public Part | getPart(String
the name of the requested name)PartImplements javax. |
| public Collection | getParts()
Implements javax. |
| public String | getPathInfo()
Implements javax. |
| public String | getPathTranslated()
Implements javax. |
| public String | getQueryString()
Implements javax. |
| public String | getRemoteUser()
Implements javax. |
| public String | getRequestedSessionId()
Implements javax. |
| public String | getRequestURI()
Implements javax. |
| public StringBuffer | getRequestURL()
Implements javax. |
| public String | getServletPath()
Implements javax. |
| public HttpSession | getSession(boolean
true to create
a new session for this request if necessary;
false to return null
if there's no current sessionImplements javax. |
| public HttpSession | getSession()
Implements javax. |
| public Map | getTrailerFields()
Overrides default javax. |
| public Principal | getUserPrincipal()
Implements javax. |
| public boolean | isRequestedSessionIdFromCookie()
Implements javax. |
| public boolean | isRequestedSessionIdFromURL()
Implements javax. |
| public boolean | isRequestedSessionIdFromUrl()
Implements javax.
Deprecated
As of Version 4.0 of the Java Servlet API,
use
The default behavior of this method is to return isRequestedSessionIdFromUrl()
on the wrapped request object.
isRequestedSessionIdFromURL instead.
|
| public boolean | isRequestedSessionIdValid()
Implements javax. |
| public boolean | isTrailerFieldsReady()
Overrides default javax. |
| public boolean | isUserInRole(String
a role)String specifying the name
of the roleImplements javax. |
| public void | login(String
The username, String String value corresponding to
the login identifier of the user.The password password)String corresponding
to the identified user.Implements javax. |
| public void | logout()
Implements javax. |
| public PushBuilder | newPushBuilder()
Overrides default javax. |
| public <T extends HttpUpgradeHandler> T | upgrade(Class<T>
The handlerClass)HttpUpgradeHandler class used for the upgrade.Implements javax. HttpUpgradeHandler for a given
class and uses it for the http protocol upgrade processing.
|
| HttpServletRequestWrapper | back to summary |
|---|---|
| public HttpServletRequestWrapper(HttpServletRequest request) Constructs a request object wrapping the given request.
| |
| _getHttpServletRequest | back to summary |
|---|---|
| private HttpServletRequest _getHttpServletRequest() | |
| authenticate | back to summary |
|---|---|
| public boolean authenticate(HttpServletResponse response) throws IOException, ServletException Implements javax. The default behavior of this method is to call authenticate on the wrapped request object.
| |
| changeSessionId | back to summary |
|---|---|
| public String changeSessionId() Implements javax. The default behavior of this method is to return changeSessionId() on the wrapped request object.
| |
| getAuthType | back to summary |
|---|---|
| public String getAuthType() Implements javax. The default behavior of this method is to return getAuthType() on the wrapped request object.
| |
| getContextPath | back to summary |
|---|---|
| public String getContextPath() Implements javax. The default behavior of this method is to return getContextPath() on the wrapped request object.
| |
| getCookies | back to summary |
|---|---|
| public Cookie[] getCookies() Implements javax. The default behavior of this method is to return getCookies() on the wrapped request object.
| |
| getDateHeader | back to summary |
|---|---|
| public long getDateHeader(String name) Implements javax. The default behavior of this method is to return getDateHeader(String name) on the wrapped request object.
| |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Implements javax. The default behavior of this method is to return getHeader(String name) on the wrapped request object.
| |
| getHeaderNames | back to summary |
|---|---|
| public Enumeration Implements javax. The default behavior of this method is to return getHeaderNames() on the wrapped request object.
| |
| getHeaders | back to summary |
|---|---|
| public Enumeration Implements javax. The default behavior of this method is to return getHeaders(String name) on the wrapped request object.
| |
| getHttpServletMapping | back to summary |
|---|---|
| public HttpServletMapping getHttpServletMapping() Overrides default javax. The default behavior of this method is to return getServletMapping() on the wrapped request object.
| |
| getIntHeader | back to summary |
|---|---|
| public int getIntHeader(String name) Implements javax. The default behavior of this method is to return getIntHeader(String name) on the wrapped request object.
| |
| getMethod | back to summary |
|---|---|
| public String getMethod() Implements javax. The default behavior of this method is to return getMethod() on the wrapped request object.
| |
| getPart | back to summary |
|---|---|
| public Part getPart(String name) throws IOException, ServletException Implements javax. The default behavior of this method is to call getPart on the wrapped request object.
| |
| getParts | back to summary |
|---|---|
| public Collection Implements javax. The default behavior of this method is to call getParts on the wrapped request object. Any changes to the returned
| |
| getPathInfo | back to summary |
|---|---|
| public String getPathInfo() Implements javax. The default behavior of this method is to return getPathInfo() on the wrapped request object.
| |
| getPathTranslated | back to summary |
|---|---|
| public String getPathTranslated() Implements javax. The default behavior of this method is to return getPathTranslated() on the wrapped request object.
| |
| getQueryString | back to summary |
|---|---|
| public String getQueryString() Implements javax. The default behavior of this method is to return getQueryString() on the wrapped request object.
| |
| getRemoteUser | back to summary |
|---|---|
| public String getRemoteUser() Implements javax. The default behavior of this method is to return getRemoteUser() on the wrapped request object.
| |
| getRequestedSessionId | back to summary |
|---|---|
| public String getRequestedSessionId() Implements javax. The default behavior of this method is to return getRequestedSessionId() on the wrapped request object.
| |
| getRequestURI | back to summary |
|---|---|
| public String getRequestURI() Implements javax. The default behavior of this method is to return getRequestURI() on the wrapped request object.
| |
| getRequestURL | back to summary |
|---|---|
| public StringBuffer getRequestURL() Implements javax. The default behavior of this method is to return getRequestURL() on the wrapped request object.
| |
| getServletPath | back to summary |
|---|---|
| public String getServletPath() Implements javax. The default behavior of this method is to return getServletPath() on the wrapped request object.
| |
| getSession | back to summary |
|---|---|
| public HttpSession getSession(boolean create) Implements javax. The default behavior of this method is to return getSession(boolean create) on the wrapped request object.
| |
| getSession | back to summary |
|---|---|
| public HttpSession getSession() Implements javax. The default behavior of this method is to return getSession() on the wrapped request object.
| |
| getTrailerFields | back to summary |
|---|---|
| public Map Overrides default javax. The default behavior of this method is to call getTrailerFields on the wrapped request object.
| |
| getUserPrincipal | back to summary |
|---|---|
| public Principal getUserPrincipal() Implements javax. The default behavior of this method is to return getUserPrincipal() on the wrapped request object.
| |
| isRequestedSessionIdFromCookie | back to summary |
|---|---|
| public boolean isRequestedSessionIdFromCookie() Implements javax. The default behavior of this method is to return isRequestedSessionIdFromCookie() on the wrapped request object.
| |
| isRequestedSessionIdFromURL | back to summary |
|---|---|
| public boolean isRequestedSessionIdFromURL() Implements javax. The default behavior of this method is to return isRequestedSessionIdFromURL() on the wrapped request object.
| |
| isRequestedSessionIdFromUrl | back to summary |
|---|---|
| public boolean isRequestedSessionIdFromUrl() Implements javax. Deprecated As of Version 4.0 of the Java Servlet API,
use The default behavior of this method is to return isRequestedSessionIdFromUrl() on the wrapped request object.
| |
| isRequestedSessionIdValid | back to summary |
|---|---|
| public boolean isRequestedSessionIdValid() Implements javax. The default behavior of this method is to return isRequestedSessionIdValid() on the wrapped request object.
| |
| isTrailerFieldsReady | back to summary |
|---|---|
| public boolean isTrailerFieldsReady() Overrides default javax. The default behavior of this method is to call isTrailerFieldsReady on the wrapped request object.
| |
| isUserInRole | back to summary |
|---|---|
| public boolean isUserInRole(String role) Implements javax. The default behavior of this method is to return isUserInRole(String role) on the wrapped request object.
| |
| login | back to summary |
|---|---|
| public void login(String username, String password) throws ServletException Implements javax. The default behavior of this method is to call login on the wrapped request object.
| |
| logout | back to summary |
|---|---|
| public void logout() throws ServletException Implements javax. The default behavior of this method is to call login on the wrapped request object.
| |
| newPushBuilder | back to summary |
|---|---|
| public PushBuilder newPushBuilder() Overrides default javax. The default behavior of this method is to call newPushBuilder on the wrapped request object.
| |
| upgrade | back to summary |
|---|---|
| public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException Implements javax. Create an instance of
| |