public class HttpServletRequestWrapper extends ServletRequestWrapper implements HttpServletRequest
HttpServletRequest
interface through to the wrapped objectBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
Constructor and Description |
---|
HttpServletRequestWrapper(HttpServletRequest wrappedRequest)
Creates a new HttpServletRequestWrapper which wraps the passed
HttpServletRequest
|
Modifier and Type | Method and Description |
---|---|
boolean |
authenticate(HttpServletResponse response)
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getAuthType()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getContextPath()
By default passes the call to the underlying HttpServletRequest
|
Cookie[] |
getCookies()
By default passes the call to the underlying HttpServletRequest
|
long |
getDateHeader(java.lang.String name)
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getHeader(java.lang.String name)
By default passes the call to the underlying HttpServletRequest
|
java.util.Enumeration |
getHeaderNames()
By default passes the call to the underlying HttpServletRequest
|
java.util.Enumeration |
getHeaders(java.lang.String name)
By default passes the call to the underlying HttpServletRequest
|
int |
getIntHeader(java.lang.String name)
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getMethod()
By default passes the call to the underlying HttpServletRequest
|
Part |
getPart(java.lang.String name)
By default passes the call to the underlying HttpServletRequest
|
java.util.Collection<Part> |
getParts()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getPathInfo()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getPathTranslated()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getQueryString()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getRemoteUser()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getRequestedSessionId()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getRequestURI()
By default passes the call to the underlying HttpServletRequest
|
java.lang.StringBuffer |
getRequestURL()
By default passes the call to the underlying HttpServletRequest
|
java.lang.String |
getServletPath()
By default passes the call to the underlying HttpServletRequest
|
HttpSession |
getSession()
By default passes the call to the underlying HttpServletRequest
|
HttpSession |
getSession(boolean create)
By default passes the call to the underlying HttpServletRequest
|
java.security.Principal |
getUserPrincipal()
By default passes the call to the underlying HttpServletRequest
|
boolean |
isRequestedSessionIdFromCookie()
By default passes the call to the underlying HttpServletRequest
|
boolean |
isRequestedSessionIdFromUrl()
Deprecated.
|
boolean |
isRequestedSessionIdFromURL()
By default passes the call to the underlying HttpServletRequest
|
boolean |
isRequestedSessionIdValid()
By default passes the call to the underlying HttpServletRequest
|
boolean |
isUserInRole(java.lang.String role)
By default passes the call to the underlying HttpServletRequest
|
void |
login(java.lang.String username,
java.lang.String password)
By default passes the call to the underlying HttpServletRequest
|
void |
logout()
By default passes the call to the underlying HttpServletRequest
|
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getParameter, getParameterMap, getParameterNames, getParameterValues, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
public HttpServletRequestWrapper(HttpServletRequest wrappedRequest)
wrappedObject
- the object to be wrappedjava.lang.IllegalArgumentException
- if wrappedObject is nullpublic java.lang.String getAuthType()
getAuthType
in interface HttpServletRequest
public Cookie[] getCookies()
getCookies
in interface HttpServletRequest
public long getDateHeader(java.lang.String name)
getDateHeader
in interface HttpServletRequest
name
- the name of the header field (case insensitive)public java.lang.String getHeader(java.lang.String name)
getHeader
in interface HttpServletRequest
name
- the name of the header field (case insensitive)public java.util.Enumeration getHeaders(java.lang.String name)
getHeaders
in interface HttpServletRequest
public java.util.Enumeration getHeaderNames()
getHeaderNames
in interface HttpServletRequest
public int getIntHeader(java.lang.String name)
getIntHeader
in interface HttpServletRequest
name
- the name of the header field (case insensitive)public java.lang.String getMethod()
getMethod
in interface HttpServletRequest
public java.lang.String getPathInfo()
getPathInfo
in interface HttpServletRequest
public java.lang.String getPathTranslated()
getPathTranslated
in interface HttpServletRequest
public java.lang.String getContextPath()
getContextPath
in interface HttpServletRequest
public java.lang.String getQueryString()
getQueryString
in interface HttpServletRequest
public java.lang.String getRemoteUser()
getRemoteUser
in interface HttpServletRequest
public boolean isUserInRole(java.lang.String role)
isUserInRole
in interface HttpServletRequest
public java.security.Principal getUserPrincipal()
getUserPrincipal
in interface HttpServletRequest
public java.lang.String getRequestedSessionId()
getRequestedSessionId
in interface HttpServletRequest
public java.lang.String getRequestURI()
getRequestURI
in interface HttpServletRequest
public java.lang.StringBuffer getRequestURL()
getRequestURL
in interface HttpServletRequest
public java.lang.String getServletPath()
getServletPath
in interface HttpServletRequest
public HttpSession getSession(boolean create)
getSession
in interface HttpServletRequest
public HttpSession getSession()
getSession
in interface HttpServletRequest
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid
in interface HttpServletRequest
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie
in interface HttpServletRequest
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL
in interface HttpServletRequest
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromURL()
isRequestedSessionIdFromUrl
in interface HttpServletRequest
public boolean authenticate(HttpServletResponse response) throws java.io.IOException, ServletException
authenticate
in interface HttpServletRequest
java.io.IOException
ServletException
public void login(java.lang.String username, java.lang.String password) throws ServletException
login
in interface HttpServletRequest
ServletException
- on login failurepublic void logout() throws ServletException
logout
in interface HttpServletRequest
ServletException
public java.util.Collection<Part> getParts() throws java.io.IOException, ServletException
getParts
in interface HttpServletRequest
ServletException
- if this request is not of type
multipart/form-datajava.io.IOException
public Part getPart(java.lang.String name) throws java.io.IOException, ServletException
getPart
in interface HttpServletRequest
ServletException
- if this request is not of type
multipart/form-datajava.io.IOException