TestWeb.TestHttpServletRequest
A HTTP servlet request for testing.
Methods
boolean
authenticate
(HttpServletResponse response)
boolean
authenticate
(HttpServletResponse response)
String
changeSessionId
()
String
changeSessionId
()
AsyncContext
getAsyncContext
()
AsyncContext
getAsyncContext
()
Object
getAttribute
(String name)
Object
getAttribute
(String name)
Enumeration
getAttributeNames
()
Enumeration
getAttributeNames
()
String
getAuthType
()
String
getAuthType
()
String
getCharacterEncoding
()
String
getCharacterEncoding
()
int
getContentLength
()
int
getContentLength
()
long
getContentLengthLong
()
long
getContentLengthLong
()
String
getContentType
()
String
getContentType
()
String
getContextPath
()
String
getContextPath
()
Cookie[]
getCookies
()
Cookie[]
getCookies
()
long
getDateHeader
(String x)
long
getDateHeader
(String x)
DispatcherType
getDispatcherType
()
DispatcherType
getDispatcherType
()
String
getHeader
(String name)
String
getHeader
(String name)
Enumeration
getHeaderNames
()
Enumeration
getHeaderNames
()
Enumeration
getHeaders
(String name)
Enumeration
getHeaders
(String name)
ServletInputStream
getInputStream
()
ServletInputStream
getInputStream
() throws IOException
int
getIntHeader
(String name)
int
getIntHeader
(String name)
String
getLocalAddr
()
String
getLocalAddr
()
String
getLocalName
()
String
getLocalName
()
int
getLocalPort
()
int
getLocalPort
()
Locale
getLocale
()
Locale
getLocale
()
Enumeration
getLocales
()
Enumeration
getLocales
()
String
getMethod
()
String
getMethod
()
String
getParameter
(String name)
String
getParameter
(String name)
Map
getParameterMap
()
Map
getParameterMap
()
Enumeration
getParameterNames
()
Enumeration
getParameterNames
()
String[]
getParameterValues
(String name)
String[]
getParameterValues
(String name)
Part
getPart
(String name)
Part
getPart
(String name)
Collection
getParts
()
Collection
getParts
()
String
getPathInfo
()
String
getPathInfo
()
String
getPathTranslated
()
String
getPathTranslated
()
String
getProtocol
()
String
getProtocol
()
String
getQueryString
()
String
getQueryString
()
BufferedReader
getReader
()
BufferedReader
getReader
() throws IOException
String
getRealPath
(String path)
String
getRealPath
(String path)
String
getRemoteAddr
()
String
getRemoteAddr
()
String
getRemoteHost
()
String
getRemoteHost
()
int
getRemotePort
()
int
getRemotePort
()
String
getRemoteUser
()
String
getRemoteUser
()
RequestDispatcher
getRequestDispatcher
(String name)
RequestDispatcher
getRequestDispatcher
(String name)
String
getRequestURI
()
String
getRequestURI
()
StringBuffer
getRequestURL
()
StringBuffer
getRequestURL
()
String
getRequestedSessionId
()
String
getRequestedSessionId
()
String
getScheme
()
String
getScheme
()
String
getServerName
()
String
getServerName
()
int
getServerPort
()
int
getServerPort
()
ServletContext
getServletContext
()
ServletContext
getServletContext
()
String
getServletPath
()
String
getServletPath
()
HttpSession
getSession
()
HttpSession
getSession
()
HttpSession
getSession
(boolean x)
HttpSession
getSession
(boolean x)
Principal
getUserPrincipal
()
Principal
getUserPrincipal
()
boolean
isAsyncStarted
()
boolean
isAsyncStarted
()
boolean
isAsyncSupported
()
boolean
isAsyncSupported
()
boolean
isRequestedSessionIdFromCookie
()
boolean
isRequestedSessionIdFromCookie
()
boolean
isRequestedSessionIdFromURL
()
boolean
isRequestedSessionIdFromURL
()
boolean
isRequestedSessionIdFromUrl
()
boolean
isRequestedSessionIdFromUrl
()
boolean
isRequestedSessionIdValid
()
boolean
isRequestedSessionIdValid
()
boolean
isSecure
()
boolean
isSecure
()
boolean
isUserInRole
(String x)
boolean
isUserInRole
(String x)
void
login
(String username, String password)
void
login
(String username, String password)
void
logout
()
void
logout
()
void
removeAttribute
(String name)
void
removeAttribute
(String name)
void
setAttribute
(String name, Object value)
void
setAttribute
(String name, Object value)
void
setCharacterEncoding
(String encoding)
void
setCharacterEncoding
(String encoding) throws UnsupportedEncodingException
void
setPathInfo
(String pathInfo)
void
setPathInfo
(String pathInfo)
AsyncContext
startAsync
()
AsyncContext
startAsync
()
AsyncContext
startAsync
(ServletRequest servletRequest, ServletResponse servletResponse)
AsyncContext
startAsync
(ServletRequest servletRequest, ServletResponse servletResponse)
T
upgrade
(Class handlerClass)
T
upgrade
(Class handlerClass) throws IOException, ServletException