content
The Content for this request.
HttpServletRequest, ServletRequestMock HttpServletRequest object for low-level unit tests of Struts controller components. Coarser grained tests should be implemented in terms of the Cactus framework, instead of the mock object classes.
WARNING - Only the minimal set of methods needed to
create unit tests is provided, plus additional methods to configure this
object as necessary. Methods for unsupported operations will throw
UnsupportedOperationException.
WARNING - Because unit tests operate in a single threaded environment, no synchronization is performed.
protected Stringprotected byte[]protected Stringprotected Stringprotected Localeprotected Stringprotected Stringprotected Principalprotected Stringprotected Stringprotected HttpSessionBASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTHMockHttpServletRequest(HttpSession session) MockHttpServletRequest(String contextPath,
String servletPath,
String pathInfo,
String queryString) MockHttpServletRequest(String contextPath,
String servletPath,
String pathInfo,
String queryString,
HttpSession session) voidaddParameter(String name,
String value) booleanauthenticate(HttpServletResponse response) getAttribute(String name) intlongCookie[]longgetDateHeader(String name) getHeaders(String name) intgetIntHeader(String name) intgetParameter(String name) String[]getParameterValues(String name) getParts()getRealPath(String path) intgetRequestDispatcher(String path) intgetSession(boolean create) booleanbooleanbooleanbooleanbooleanbooleanbooleanisSecure()booleanisUserInRole(String role) voidvoidlogout()voidremoveAttribute(String name) voidsetAttribute(String name,
Object o) voidvoidsetContent(byte[] content) voidsetContentType(String contentType) voidsetHttpSession(HttpSession session) voidvoidvoidsetPathElements(String contextPath,
String servletPath,
String pathInfo,
String queryString) voidsetUserPrincipal(Principal principal) startAsync(ServletRequest servletRequest,
ServletResponse servletResponse) <T extends HttpUpgradeHandler>
Tclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilderThe set of request attributes.
The context path for this request.
The preferred locale for this request.
The set of arrays of parameter values, keyed by parameter name.
The extra path information for this request. v *
The authenticated user for this request.
The query string for this request.
The servlet path for this request.
The HttpSession with which we are associated.
The HTTP request method.
The Content Type for this request.
The Character Encoding for this request.
The Content for this request.
getAuthType in interface HttpServletRequestgetCookies in interface HttpServletRequestgetDateHeader in interface HttpServletRequestgetHeader in interface HttpServletRequestgetHeaders in interface HttpServletRequestgetHeaderNames in interface HttpServletRequestgetIntHeader in interface HttpServletRequestgetMethod in interface HttpServletRequestgetPathInfo in interface HttpServletRequestgetPathTranslated in interface HttpServletRequestgetContextPath in interface HttpServletRequestgetQueryString in interface HttpServletRequestgetRemoteUser in interface HttpServletRequestisUserInRole in interface HttpServletRequestgetUserPrincipal in interface HttpServletRequestgetRequestedSessionId in interface HttpServletRequestgetRequestURI in interface HttpServletRequestgetRequestURL in interface HttpServletRequestgetServletPath in interface HttpServletRequestgetSession in interface HttpServletRequestgetSession in interface HttpServletRequestchangeSessionId in interface HttpServletRequestisRequestedSessionIdValid in interface HttpServletRequestisRequestedSessionIdFromCookie in interface HttpServletRequestisRequestedSessionIdFromURL in interface HttpServletRequestisRequestedSessionIdFromUrl in interface HttpServletRequestauthenticate in interface HttpServletRequestIOExceptionServletExceptionlogin in interface HttpServletRequestServletExceptionlogout in interface HttpServletRequestServletExceptiongetParts in interface HttpServletRequestIOExceptionServletExceptionupgrade in interface HttpServletRequestIOExceptionServletExceptiongetPart in interface HttpServletRequestIOExceptionServletExceptiongetAttribute in interface ServletRequestgetAttributeNames in interface ServletRequestgetCharacterEncoding in interface ServletRequestsetCharacterEncoding in interface ServletRequestgetContentLength in interface ServletRequestgetContentLengthLong in interface ServletRequestgetContentType in interface ServletRequestgetInputStream in interface ServletRequestIOExceptiongetParameter in interface ServletRequestgetParameterNames in interface ServletRequestgetParameterValues in interface ServletRequestgetParameterMap in interface ServletRequestgetProtocol in interface ServletRequestgetScheme in interface ServletRequestgetServerName in interface ServletRequestgetServerPort in interface ServletRequestgetReader in interface ServletRequestIOExceptiongetRemoteAddr in interface ServletRequestgetRemoteHost in interface ServletRequestsetAttribute in interface ServletRequestremoveAttribute in interface ServletRequestgetLocale in interface ServletRequestgetLocales in interface ServletRequestisSecure in interface ServletRequestgetRequestDispatcher in interface ServletRequestgetRealPath in interface ServletRequestgetRemotePort in interface ServletRequestgetLocalName in interface ServletRequestgetLocalAddr in interface ServletRequestgetLocalPort in interface ServletRequestgetServletContext in interface ServletRequeststartAsync in interface ServletRequestIllegalStateExceptionstartAsync in interface ServletRequestIllegalStateExceptionisAsyncStarted in interface ServletRequestisAsyncSupported in interface ServletRequestgetAsyncContext in interface ServletRequestgetDispatcherType in interface ServletRequest