public class MutableHttpServletRequest extends Object implements HttpServletRequest
| Modifier and Type | Field and Description |
|---|---|
Map<String,Object> |
attributeMap |
static String |
copyright |
Map<String,org.apache.commons.fileupload.FileItem[]> |
fileItemMap |
Map<String,String[]> |
headerMap |
List<Locale> |
locales |
Map<String,String[]> |
parameterMap |
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH| Constructor and Description |
|---|
MutableHttpServletRequest() |
MutableHttpServletRequest(MockServletContext servletContext) |
public static final String copyright
public MutableHttpServletRequest()
public MutableHttpServletRequest(MockServletContext servletContext)
public void addFileItem(String name, org.apache.commons.fileupload.FileItem item)
public org.apache.commons.fileupload.FileItem getFileItem(String name)
public void setFileItem(String key, org.apache.commons.fileupload.FileItem value)
public void setMethod(String method)
public void setContextPath(String context)
public void setServletPath(String servletPath)
public void makeMultipart()
public void setScheme(String scheme)
public void setServerName(String serverName)
public void setServerPort(int serverPort)
public String getParameter(String name)
getParameter in interface ServletRequestpublic Enumeration getParameterNames()
getParameterNames in interface ServletRequestpublic String[] getParameterValues(String name)
getParameterValues in interface ServletRequestpublic Map getParameterMap()
getParameterMap in interface ServletRequestpublic String getMethod()
getMethod in interface HttpServletRequestpublic String getContextPath()
getContextPath in interface HttpServletRequestpublic String getServletPath()
getServletPath in interface HttpServletRequestpublic Object getAttribute(String s)
getAttribute in interface ServletRequestpublic void setAttribute(String s, Object o)
setAttribute in interface ServletRequestpublic void removeAttribute(String s)
removeAttribute in interface ServletRequestpublic String getAuthType()
getAuthType in interface HttpServletRequestpublic Cookie[] getCookies()
getCookies in interface HttpServletRequestpublic long getDateHeader(String s)
getDateHeader in interface HttpServletRequestpublic String getHeader(String s)
getHeader in interface HttpServletRequestpublic Enumeration<String> getHeaders(String s)
getHeaders in interface HttpServletRequestpublic Enumeration<String> getHeaderNames()
getHeaderNames in interface HttpServletRequestpublic int getIntHeader(String s)
getIntHeader in interface HttpServletRequestpublic String getPathInfo()
getPathInfo in interface HttpServletRequestpublic String getPathTranslated()
getPathTranslated in interface HttpServletRequestpublic String getQueryString()
getQueryString in interface HttpServletRequestpublic String getRemoteUser()
getRemoteUser in interface HttpServletRequestpublic boolean isUserInRole(String s)
isUserInRole in interface HttpServletRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface HttpServletRequestpublic String getRequestedSessionId()
getRequestedSessionId in interface HttpServletRequestpublic String getRequestURI()
getRequestURI in interface HttpServletRequestpublic void setRequestURI(String requestURI)
public StringBuffer getRequestURL()
getRequestURL in interface HttpServletRequestpublic HttpSession getSession(boolean create)
getSession in interface HttpServletRequestpublic HttpSession getSession()
getSession in interface HttpServletRequestpublic String changeSessionId()
public boolean isRequestedSessionIdValid()
isRequestedSessionIdValid in interface HttpServletRequestpublic boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromCookie in interface HttpServletRequestpublic boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromURL in interface HttpServletRequest@Deprecated public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdFromUrl in interface HttpServletRequestpublic Enumeration getAttributeNames()
getAttributeNames in interface ServletRequestpublic String getCharacterEncoding()
getCharacterEncoding in interface ServletRequestpublic void setCharacterEncoding(String s) throws UnsupportedEncodingException
setCharacterEncoding in interface ServletRequestUnsupportedEncodingExceptionpublic int getContentLength()
getContentLength in interface ServletRequestpublic long getContentLengthLong()
public String getContentType()
getContentType in interface ServletRequestpublic void setContentType(String contentType)
public ServletInputStream getInputStream() throws IOException
getInputStream in interface ServletRequestIOExceptionpublic String getProtocol()
getProtocol in interface ServletRequestpublic String getScheme()
getScheme in interface ServletRequestpublic String getServerName()
getServerName in interface ServletRequestpublic int getServerPort()
getServerPort in interface ServletRequestpublic BufferedReader getReader() throws IOException
getReader in interface ServletRequestIOExceptionpublic String getRemoteAddr()
getRemoteAddr in interface ServletRequestpublic String getRemoteHost()
getRemoteHost in interface ServletRequestpublic Locale getLocale()
getLocale in interface ServletRequestpublic Enumeration<Locale> getLocales()
getLocales in interface ServletRequestpublic boolean isSecure()
isSecure in interface ServletRequestpublic RequestDispatcher getRequestDispatcher(String s)
getRequestDispatcher in interface ServletRequest@Deprecated public String getRealPath(String s)
getRealPath in interface ServletRequestpublic int getRemotePort()
getRemotePort in interface ServletRequestpublic String getLocalName()
getLocalName in interface ServletRequestpublic String getLocalAddr()
getLocalAddr in interface ServletRequestpublic int getLocalPort()
getLocalPort in interface ServletRequestpublic boolean authenticate(HttpServletResponse response) throws IOException, ServletException
authenticate in interface HttpServletRequestIOExceptionServletExceptionpublic void login(String s, String s1) throws ServletException
login in interface HttpServletRequestServletExceptionpublic void logout()
throws ServletException
logout in interface HttpServletRequestServletExceptionpublic Collection<Part> getParts() throws IOException, ServletException
getParts in interface HttpServletRequestIOExceptionServletExceptionpublic Part getPart(String s) throws IOException, ServletException
getPart in interface HttpServletRequestIOExceptionServletExceptionpublic ServletContext getServletContext()
getServletContext in interface ServletRequestpublic AsyncContext startAsync() throws IllegalStateException
startAsync in interface ServletRequestIllegalStateExceptionpublic AsyncContext startAsync(ServletRequest request, ServletResponse response) throws IllegalStateException
startAsync in interface ServletRequestIllegalStateExceptionpublic boolean isAsyncStarted()
isAsyncStarted in interface ServletRequestpublic boolean isAsyncSupported()
isAsyncSupported in interface ServletRequestpublic AsyncContext getAsyncContext()
getAsyncContext in interface ServletRequestpublic DispatcherType getDispatcherType()
getDispatcherType in interface ServletRequest