public class SavedRequestAwareWrapper extends SecurityContextHolderAwareRequestWrapper
Note that not all request parameters in the original request are emulated by this wrapper. Nevertheless, the important data from the original request is emulated and this should prove adequate for most purposes (in particular standard HTTP GET and POST operations).
Added into a request by SecurityContextHolderAwareRequestFilter.
SecurityContextHolderAwareRequestFilter| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Locale |
defaultLocale
The default Locale if none are specified.
|
protected java.text.SimpleDateFormat[] |
formats
The set of SimpleDateFormat formats to use in getDateHeader().
|
protected static java.util.TimeZone |
GMT_ZONE |
protected static org.apache.commons.logging.Log |
logger |
protected SavedRequest |
savedRequest |
| Constructor and Description |
|---|
SavedRequestAwareWrapper(javax.servlet.http.HttpServletRequest request,
PortResolver portResolver,
java.lang.String rolePrefix) |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.Cookie[] |
getCookies() |
long |
getDateHeader(java.lang.String name) |
java.lang.String |
getHeader(java.lang.String name) |
java.util.Enumeration |
getHeaderNames() |
java.util.Enumeration |
getHeaders(java.lang.String name) |
int |
getIntHeader(java.lang.String name) |
java.util.Locale |
getLocale() |
java.util.Enumeration |
getLocales() |
java.lang.String |
getMethod() |
java.lang.String |
getParameter(java.lang.String name)
If the parameter is available from the wrapped request then either
There is no saved request (it a normal request)
There is a saved request, but the request has been forwarded/included to a URL with parameters, either
supplementing or overriding the saved request values.
In both cases the value from the wrapped request should be used.
|
java.util.Map |
getParameterMap() |
java.util.Enumeration |
getParameterNames() |
java.lang.String[] |
getParameterValues(java.lang.String name) |
getRemoteUser, getUserPrincipal, isUserInRoleauthenticate, getAuthType, getContextPath, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, login, logoutgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, getServletContext, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsyncprotected static final org.apache.commons.logging.Log logger
protected static final java.util.TimeZone GMT_ZONE
protected static java.util.Locale defaultLocale
protected SavedRequest savedRequest
protected java.text.SimpleDateFormat[] formats
public SavedRequestAwareWrapper(javax.servlet.http.HttpServletRequest request,
PortResolver portResolver,
java.lang.String rolePrefix)
public javax.servlet.http.Cookie[] getCookies()
getCookies in interface javax.servlet.http.HttpServletRequestgetCookies in class javax.servlet.http.HttpServletRequestWrapperpublic long getDateHeader(java.lang.String name)
getDateHeader in interface javax.servlet.http.HttpServletRequestgetDateHeader in class javax.servlet.http.HttpServletRequestWrapperpublic java.lang.String getHeader(java.lang.String name)
getHeader in interface javax.servlet.http.HttpServletRequestgetHeader in class javax.servlet.http.HttpServletRequestWrapperpublic java.util.Enumeration getHeaderNames()
getHeaderNames in interface javax.servlet.http.HttpServletRequestgetHeaderNames in class javax.servlet.http.HttpServletRequestWrapperpublic java.util.Enumeration getHeaders(java.lang.String name)
getHeaders in interface javax.servlet.http.HttpServletRequestgetHeaders in class javax.servlet.http.HttpServletRequestWrapperpublic int getIntHeader(java.lang.String name)
getIntHeader in interface javax.servlet.http.HttpServletRequestgetIntHeader in class javax.servlet.http.HttpServletRequestWrapperpublic java.util.Locale getLocale()
getLocale in interface javax.servlet.ServletRequestgetLocale in class javax.servlet.ServletRequestWrapperpublic java.util.Enumeration getLocales()
getLocales in interface javax.servlet.ServletRequestgetLocales in class javax.servlet.ServletRequestWrapperpublic java.lang.String getMethod()
getMethod in interface javax.servlet.http.HttpServletRequestgetMethod in class javax.servlet.http.HttpServletRequestWrapperpublic java.lang.String getParameter(java.lang.String name)
If the value from the wrapped request is null, an attempt will be made to retrieve the parameter from the SavedRequest, if available..
getParameter in interface javax.servlet.ServletRequestgetParameter in class javax.servlet.ServletRequestWrapperpublic java.util.Map getParameterMap()
getParameterMap in interface javax.servlet.ServletRequestgetParameterMap in class javax.servlet.ServletRequestWrapperpublic java.util.Enumeration getParameterNames()
getParameterNames in interface javax.servlet.ServletRequestgetParameterNames in class javax.servlet.ServletRequestWrapperpublic java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues in interface javax.servlet.ServletRequestgetParameterValues in class javax.servlet.ServletRequestWrapper