This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
jakarta.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 jakarta. The default behavior of this method is to call authenticate on the wrapped request object. |
| public String | changeSessionId()
Implements jakarta. The default behavior of this method is to return changeSessionId() on the wrapped request object. |
| public String | getAuthType()
Implements jakarta. The default behavior of this method is to return getAuthType() on the wrapped request object. |
| public String | getContextPath()
Implements jakarta. The default behavior of this method is to return getContextPath() on the wrapped request object. |
| public Cookie[] | getCookies()
Implements jakarta. The default behavior of this method is to return getCookies() on the wrapped request object. |
| public long | getDateHeader(String
a name)String specifying the name of the headerImplements jakarta. The default behavior of this method is to return getDateHeader(String name) on the wrapped request object. |
| public String | getHeader(String
a name)String specifying the header nameImplements jakarta. The default behavior of this method is to return getHeader(String name) on the wrapped request object. |
| public Enumeration | getHeaderNames()
Implements jakarta. The default behavior of this method is to return getHeaderNames() on the wrapped request object. |
| public Enumeration | getHeaders(String
a name)String specifying the header nameImplements jakarta. The default behavior of this method is to return getHeaders(String name) on the wrapped request object. |
| public HttpServletMapping | getHttpServletMapping()
Overrides default jakarta. 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 jakarta. The default behavior of this method is to return getIntHeader(String name) on the wrapped request object. |
| public String | getMethod()
Implements jakarta. The default behavior of this method is to return getMethod() on the wrapped request object. |
| public Part | getPart(String
the name of the requested name)PartImplements jakarta. The default behavior of this method is to call getPart on the wrapped request object. |
| public Collection | getParts()
Implements jakarta. The default behavior of this method is to call getParts on the wrapped request object. |
| public String | getPathInfo()
Implements jakarta. The default behavior of this method is to return getPathInfo() on the wrapped request object. |
| public String | getPathTranslated()
Implements jakarta. The default behavior of this method is to return getPathTranslated() on the wrapped request object. |
| public String | getQueryString()
Implements jakarta. The default behavior of this method is to return getQueryString() on the wrapped request object. |
| public String | getRemoteUser()
Implements jakarta. The default behavior of this method is to return getRemoteUser() on the wrapped request object. |
| public String | getRequestedSessionId()
Implements jakarta. The default behavior of this method is to return getRequestedSessionId() on the wrapped request object. |
| public String | getRequestURI()
Implements jakarta. The default behavior of this method is to return getRequestURI() on the wrapped request object. |
| public StringBuffer | getRequestURL()
Implements jakarta. The default behavior of this method is to return getRequestURL() on the wrapped request object. |
| public String | getServletPath()
Implements jakarta. The default behavior of this method is to return getServletPath() on the wrapped request object. |
| 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 jakarta. The default behavior of this method is to return getSession(boolean create) on the wrapped request object. |
| public HttpSession | getSession()
Implements jakarta. The default behavior of this method is to return getSession() on the wrapped request object. |
| public Map | getTrailerFields()
Overrides default jakarta. The default behavior of this method is to call getTrailerFields on the wrapped request object. |
| public Principal | getUserPrincipal()
Implements jakarta. The default behavior of this method is to return getUserPrincipal() on the wrapped request object. |
| public boolean | isRequestedSessionIdFromCookie()
Implements jakarta. The default behavior of this method is to return isRequestedSessionIdFromCookie() on the wrapped request object. |
| public boolean | isRequestedSessionIdFromURL()
Implements jakarta. The default behavior of this method is to return isRequestedSessionIdFromURL() on the wrapped request object. |
| public boolean | isRequestedSessionIdValid()
Implements jakarta. The default behavior of this method is to return isRequestedSessionIdValid() on the wrapped request object. |
| public boolean | isTrailerFieldsReady()
Overrides default jakarta. The default behavior of this method is to call isTrailerFieldsReady on the wrapped request object. |
| public boolean | isUserInRole(String
a role)String specifying the name of the roleImplements jakarta. The default behavior of this method is to return isUserInRole(String role) on the wrapped request object. |
| 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 jakarta. The default behavior of this method is to call login on the wrapped request object. |
| public void | logout()
Implements jakarta. The default behavior of this method is to call login on the wrapped request object. |
| public PushBuilder | newPushBuilder()
Overrides default jakarta.
Deprecated
In favor of 103 early hints
The default behavior of this method is to call newPushBuilder on the wrapped request object. |
| public <T extends HttpUpgradeHandler> T | upgrade(Class<T>
The handlerClass)HttpUpgradeHandler class used for the upgrade.Implements jakarta. Create an instance of |
| 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 jakarta. The default behavior of this method is to call authenticate on the wrapped request object.
| |
| changeSessionId | back to summary |
|---|---|
| public String changeSessionId() Implements jakarta. The default behavior of this method is to return changeSessionId() on the wrapped request object.
| |
| getAuthType | back to summary |
|---|---|
| public String getAuthType() Implements jakarta. The default behavior of this method is to return getAuthType() on the wrapped request object.
| |
| getContextPath | back to summary |
|---|---|
| public String getContextPath() Implements jakarta. The default behavior of this method is to return getContextPath() on the wrapped request object.
| |
| getCookies | back to summary |
|---|---|
| public Cookie[] getCookies() Implements jakarta. 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 jakarta. 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 jakarta. The default behavior of this method is to return getHeader(String name) on the wrapped request object.
| |
| getHeaderNames | back to summary |
|---|---|
| public Enumeration Implements jakarta. The default behavior of this method is to return getHeaderNames() on the wrapped request object.
| |
| getHeaders | back to summary |
|---|---|
| public Enumeration Implements jakarta. 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 jakarta. 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 jakarta. 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 jakarta. 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 jakarta. The default behavior of this method is to call getPart on the wrapped request object.
| |
| getParts | back to summary |
|---|---|
| public Collection Implements jakarta. 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 jakarta. The default behavior of this method is to return getPathInfo() on the wrapped request object.
| |
| getPathTranslated | back to summary |
|---|---|
| public String getPathTranslated() Implements jakarta. The default behavior of this method is to return getPathTranslated() on the wrapped request object.
| |
| getQueryString | back to summary |
|---|---|
| public String getQueryString() Implements jakarta. The default behavior of this method is to return getQueryString() on the wrapped request object.
| |
| getRemoteUser | back to summary |
|---|---|
| public String getRemoteUser() Implements jakarta. The default behavior of this method is to return getRemoteUser() on the wrapped request object.
| |
| getRequestedSessionId | back to summary |
|---|---|
| public String getRequestedSessionId() Implements jakarta. The default behavior of this method is to return getRequestedSessionId() on the wrapped request object.
| |
| getRequestURI | back to summary |
|---|---|
| public String getRequestURI() Implements jakarta. The default behavior of this method is to return getRequestURI() on the wrapped request object.
| |
| getRequestURL | back to summary |
|---|---|
| public StringBuffer getRequestURL() Implements jakarta. The default behavior of this method is to return getRequestURL() on the wrapped request object.
| |
| getServletPath | back to summary |
|---|---|
| public String getServletPath() Implements jakarta. 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 jakarta. 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 jakarta. The default behavior of this method is to return getSession() on the wrapped request object.
| |
| getTrailerFields | back to summary |
|---|---|
| public Map Overrides default jakarta. The default behavior of this method is to call getTrailerFields on the wrapped request object.
| |
| getUserPrincipal | back to summary |
|---|---|
| public Principal getUserPrincipal() Implements jakarta. The default behavior of this method is to return getUserPrincipal() on the wrapped request object.
| |
| isRequestedSessionIdFromCookie | back to summary |
|---|---|
| public boolean isRequestedSessionIdFromCookie() Implements jakarta. The default behavior of this method is to return isRequestedSessionIdFromCookie() on the wrapped request object.
| |
| isRequestedSessionIdFromURL | back to summary |
|---|---|
| public boolean isRequestedSessionIdFromURL() Implements jakarta. The default behavior of this method is to return isRequestedSessionIdFromURL() on the wrapped request object.
| |
| isRequestedSessionIdValid | back to summary |
|---|---|
| public boolean isRequestedSessionIdValid() Implements jakarta. The default behavior of this method is to return isRequestedSessionIdValid() on the wrapped request object.
| |
| isTrailerFieldsReady | back to summary |
|---|---|
| public boolean isTrailerFieldsReady() Overrides default jakarta. 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 jakarta. 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 jakarta. 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 jakarta. The default behavior of this method is to call login on the wrapped request object.
| |
| newPushBuilder | back to summary |
|---|---|
| public PushBuilder newPushBuilder() Overrides default jakarta. Deprecated In favor of 103 early hints 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 jakarta. Create an instance of
| |