public class StripesRequestWrapper
extends javax.servlet.http.HttpServletRequestWrapper
Constructor and Description |
---|
StripesRequestWrapper(javax.servlet.http.HttpServletRequest request)
Constructor that will, if the POST is multi-part, parse the POST data and make it
available through the normal channels.
|
Modifier and Type | Method and Description |
---|---|
protected void |
constructMultipartWrapper(javax.servlet.http.HttpServletRequest request)
Responsible for constructing the MultipartWrapper object and setting it on to
the instance variable 'multipart'.
|
static StripesRequestWrapper |
findStripesWrapper(javax.servlet.ServletRequest request)
Looks for the StripesRequesetWrapper for the specific request and returns it.
|
java.util.Enumeration<java.lang.String> |
getFileParameterNames()
Returns the names of request parameters that represent files being uploaded by the user.
|
FileBean |
getFileParameterValue(java.lang.String name)
Returns a FileBean representing an uploaded file with the form field name = "name".
|
java.util.Locale |
getLocale()
Provides access to the Locale being used to process the request.
|
java.util.Enumeration<java.util.Locale> |
getLocales()
Returns a single element enumeration containing the selected Locale for this request.
|
java.lang.String |
getParameter(java.lang.String name)
Retrieves the first value of the specified parameter from the request.
|
net.sourceforge.stripes.controller.MergedParameterMap |
getParameterMap()
If the request is a clean URL, then extract the parameters from the URI and merge with the
parameters from the query string and/or request body.
|
java.util.Enumeration<java.lang.String> |
getParameterNames()
Fetches just the names of regular parameters and does not include file upload parameters.
|
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns all values sent in the request for a given parameter name.
|
boolean |
isMultipart()
Returns true if this request is wrapping a multipart request, false otherwise.
|
void |
popUriParameters()
Restore the URI parameters to the state they were in before the previous call to
pushUriParameters(HttpServletRequestWrapper) . |
void |
pushUriParameters(javax.servlet.http.HttpServletRequestWrapper request)
Extract new URI parameters from the URI of the given
request and merge them with the
previous URI parameters. |
protected void |
setLocale(java.util.Locale locale)
Used by the dispatcher to set the Locale chosen by the configured LocalePicker.
|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isUserInRole
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding, setRequest
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentType, getInputStream, getLocalAddr, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isSecure, removeAttribute, setAttribute, setCharacterEncoding
public StripesRequestWrapper(javax.servlet.http.HttpServletRequest request) throws StripesServletException
request
- the HttpServletRequest to wrap
this is not a file size limit, but a post size limit.FileUploadLimitExceededException
- if the total post size is larger than the limitStripesServletException
- if any other error occurs constructing the wrapperpublic static StripesRequestWrapper findStripesWrapper(javax.servlet.ServletRequest request)
request
- the ServletRequest that is wrapped by a StripesRequestWrapperjava.lang.IllegalStateException
- if the request is not wrapped by Stripesprotected void constructMultipartWrapper(javax.servlet.http.HttpServletRequest request) throws StripesServletException
request
- the HttpServletRequest to wrap
this is not a file size limit, but a post size limit.StripesServletException
- if any other error occurs constructing the wrapperpublic boolean isMultipart()
public java.util.Enumeration<java.lang.String> getParameterNames()
getParameterNames
in interface javax.servlet.ServletRequest
getParameterNames
in class javax.servlet.ServletRequestWrapper
public java.lang.String[] getParameterValues(java.lang.String name)
getParameterValues
in interface javax.servlet.ServletRequest
getParameterValues
in class javax.servlet.ServletRequestWrapper
public java.lang.String getParameter(java.lang.String name)
getParameter
in interface javax.servlet.ServletRequest
getParameter
in class javax.servlet.ServletRequestWrapper
public net.sourceforge.stripes.controller.MergedParameterMap getParameterMap()
getParameterMap
in interface javax.servlet.ServletRequest
getParameterMap
in class javax.servlet.ServletRequestWrapper
public void pushUriParameters(javax.servlet.http.HttpServletRequestWrapper request)
request
and merge them with the
previous URI parameters.public void popUriParameters()
pushUriParameters(HttpServletRequestWrapper)
.public java.util.Locale getLocale()
getLocale
in interface javax.servlet.ServletRequest
getLocale
in class javax.servlet.ServletRequestWrapper
LocalePicker
public java.util.Enumeration<java.util.Locale> getLocales()
getLocales
in interface javax.servlet.ServletRequest
getLocales
in class javax.servlet.ServletRequestWrapper
LocalePicker
protected void setLocale(java.util.Locale locale)
public java.util.Enumeration<java.lang.String> getFileParameterNames()
public FileBean getFileParameterValue(java.lang.String name)
name
- the form field name of type file? Copyright 2005-2006, Stripes Development Team.