Package com.avoka.tm.test
Class MockRequest
java.lang.Object
com.avoka.tm.test.MockRequest
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest
Mock implementation of HttpServletRequest.
Implements all of the methods from the standard HttpServletRequest class plus helper methods to aid setting up a request.
This class was adapted from Apache Click.
- Since:
- 5.0
- See Also:
-
Field Summary
FieldsFields inherited from interface jakarta.servlet.http.HttpServletRequest
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
ConstructorsConstructorDescriptionCreate new MockRequest.MockRequest(jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified context.MockRequest(Locale locale) Create new MockRequest for the specified local.MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified locale and servletContext.MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.MockRequest(Locale locale, String contextPath, String servletPath, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments. -
Method Summary
Modifier and TypeMethodDescriptionaddCookie(jakarta.servlet.http.Cookie cookie) Add a new cookie.Add a header to the request.booleanauthenticate(jakarta.servlet.http.HttpServletResponse response) jakarta.servlet.AsyncContextgetAttribute(String name) Get an attribute.Get the names of all of the values.Get the auth type.Get the current character encoding.intReturn the length of the content.longIf useMultiPartContentType set as true return the correct content-type.Returns the portion of the request URI that indicates the context of the request.jakarta.servlet.http.Cookie[]Get all of the cookies for this request.longgetDateHeader(String name) Get the given header as a date.jakarta.servlet.DispatcherTypeReturns the url that was forwarded to, otherwise return null.Get the given header value.Get the names of all of the headers.Return the map of headers for this request.getHeaders(String name) Get enumeration of all header values with the given name.Returns the list of server side included url's.jakarta.servlet.ServletInputStreamReturns an input stream if there has been added some uploaded files.intgetIntHeader(String name) Get the given header as an int.Return the local address, "127.0.0.1".Get the locale of the request.Return all the accepted locales.Return the local name, "127.0.0.1".intReturn the local port, 80.Get the method.getParameter(String name) Get the request parameter with the given name.Get the map of all of the parameters.Get the names of all of the parameters.String[]getParameterValues(String name) Get the values for the given parameter.jakarta.servlet.http.PartCollection<jakarta.servlet.http.Part> getParts()Get the path info.Always returns null.Get the protocol.Get the query string part of the request.This feature is not implemented at this time as we are not supporting binary servlet input.getRealPath(String name) Deprecated.Use ServletContext.getRealPath(String) instead.Get the remote address of the client.Get the remote host.intReturn the remote port, 80.Return the name of theuserPrincipalif set, otherwise the value of the "REMOTE_USER" header.jakarta.servlet.RequestDispatchergetRequestDispatcher(String path) Returns a RequestDispatcher for the specified path.Get the requested session id.Returns context path and servlet path concatenated, typically /applicationClassName/applicationClassName.Returns (an attempt at) a reconstructed URL based on it's constituent parts.Get the scheme http, https, or ftp.Get the host server name to which the request was sent.intReturns the port number to which the request was sent.jakarta.servlet.ServletConnectionjakarta.servlet.ServletContextReturn the servlet context.Return a String containing the name or path of the servlet being called.jakarta.servlet.http.HttpSessionReturns the current HttpSession associated with this request.jakarta.servlet.http.HttpSessiongetSession(boolean create) Returns the current HttpSession associated with this request.Get the user principal.final voidReset the request back to a default state.booleanbooleanbooleanisPost()Return whether the request is a post or not.booleanCheck whether session id is from a cookie.booleanCheck whether session id is from a url rewrite.booleanCheck whether session id is from a url rewrite.booleanCheck whether the session id is valid.booleanisSecure()Always returns false.booleanisUserInRole(String role) Returns true if theauthenticated useris included in the given role, false otherwise.voidvoidlogout()voidremoveAttribute(String name) Remove the given attribute.removeParameter(String name) Remove the specified parameter.voidreset()Delegate to initialize method.voidsetAttribute(String name, Object o) Set the given attribute.voidsetAuthType(String authType) Set the auth type.voidsetCharacterEncoding(String encoding) Set the character encoding.setContentType(String contentType) Set the request content type.setContextPath(String contextPath) Set the portion of the request URI that indicates the context of the request.voidsetCookies(jakarta.servlet.http.Cookie[] theCookies) Set the cookies.Set request header value.Set request header values.setHttpSession(jakarta.servlet.http.HttpSession session) Set the request's session instance.Set the method.setParameter(String name, String value) Set a parameter.setParameter(String name, String[] values) Set the specified parameter name to the array of strings.setParameters(Map<String, Object> parameters) Sets a map of parameters.setPathInfo(String path) Set the path that this request is supposed to be serving.voidsetRequestURL(String requestURL) Provide a convenience method for setting the request URL.Set the request's scheme, for example http, https, or ftp.setServerName(String serverName) Sets the host server name to which the request was sent.setServerPort(int serverPort) Set the port number to which the request was sent.setServletContext(jakarta.servlet.ServletContext servletContext) Set the request's servletContext instance.setServletPath(String servletPath) Set the string containing the name or path of the servlet being called.setSession(jakarta.servlet.http.HttpSession session) Set the current HttpSession associated with this request.setUseMultiPartContentType(boolean useMultiPartContentType) True will force Request to generate multiPart ContentType and ContentLength.setUserPrincipal(Principal userPrincipal) Set the user principal.jakarta.servlet.AsyncContextjakarta.servlet.AsyncContextstartAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) toString()Returns the String representation of the mock request.jakarta.servlet.http.HttpUpgradeHandlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.servlet.http.HttpServletRequest
getHttpServletMapping, getTrailerFields, isTrailerFieldsReady, newPushBuilder
-
Field Details
-
REMOTE_USER
The REMOTE_USER header.- See Also:
-
-
Constructor Details
-
MockRequest
public MockRequest()Create new MockRequest. -
MockRequest
Create new MockRequest for the specified local.- Parameters:
locale- locale for this request
-
MockRequest
public MockRequest(jakarta.servlet.ServletContext servletContext) Create a new MockRequest for the specified context.- Parameters:
servletContext- the servletContext for this request
-
MockRequest
Create a new MockRequest for the specified locale and servletContext.- Parameters:
locale- locale for this requestservletContext- the servletContext for this request
-
MockRequest
public MockRequest(Locale locale, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.- Parameters:
locale- The request locale, or null to use the default localeservletContext- The current servlet contextsession- The session object
-
MockRequest
public MockRequest(Locale locale, String contextPath, String servletPath, jakarta.servlet.ServletContext servletContext, jakarta.servlet.http.HttpSession session) Create a new MockRequest for the specified arguments.- Parameters:
locale- The request locale, or null to use the default localecontextPath- the request context pathservletPath- the request servlet pathservletContext- The current servlet contextsession- the request session
-
-
Method Details
-
setServletContext
Set the request's servletContext instance.- Parameters:
servletContext- the new ServletContext instance- Returns:
- the MockRequest object
-
setHttpSession
Set the request's session instance.- Parameters:
session- the new HttpSession instance- Returns:
- the MockRequest object
-
addCookie
Add a new cookie.- Parameters:
cookie- The cookie- Returns:
- the MockRequest object
-
addHeader
Add a header to the request.- Parameters:
name- the name of the header to addvalue- the value- Returns:
- the MockRequest object
-
setHeader
Set request header value. The existing header value will be replaced.- Parameters:
name- the name of the header to setvalue- the header value- Returns:
- the MockRequest object
-
setHeader
Set request header values. The existing header values will be replaced.- Parameters:
name- the name of the header to setvalues- the header values- Returns:
- the MockRequest object
-
getAttribute
Get an attribute.- Specified by:
getAttributein interfacejakarta.servlet.ServletRequest- Parameters:
name- The attribute name- Returns:
- The value, or null
-
getAttributeNames
Get the names of all of the values.- Specified by:
getAttributeNamesin interfacejakarta.servlet.ServletRequest- Returns:
- The names
-
getAuthType
Get the auth type.- Specified by:
getAuthTypein interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The auth type
-
getCharacterEncoding
Get the current character encoding.- Specified by:
getCharacterEncodingin interfacejakarta.servlet.ServletRequest- Returns:
- The character encoding
-
setUseMultiPartContentType
True will force Request to generate multiPart ContentType and ContentLength.- Parameters:
useMultiPartContentType- true if the request is multi-part, false otherwise- Returns:
- the MockRequest object
-
getContentLength
public int getContentLength()Return the length of the content. This is always -1 except if useMultiPartContentType set as true. Then the length will be the length of the generated request.- Specified by:
getContentLengthin interfacejakarta.servlet.ServletRequest- Returns:
- -1 if useMultiPartContentType is false. Else the length of the generated request.
-
setContentType
Set the request content type.- Parameters:
contentType- the request content type.- Returns:
- the MockRequest object
-
getContentType
If useMultiPartContentType set as true return the correct content-type. If the contentType property is defined then this value will be returned.- Specified by:
getContentTypein interfacejakarta.servlet.ServletRequest- Returns:
- The correct multipart content-type if useMultiPartContentType is true. Else null.
-
getCookies
public jakarta.servlet.http.Cookie[] getCookies()Get all of the cookies for this request.- Specified by:
getCookiesin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The cookies
-
getDateHeader
Get the given header as a date.- Specified by:
getDateHeaderin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
name- The header name- Returns:
- The date, or -1 if header not found
-
getHeader
Get the given header value.- Specified by:
getHeaderin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
name- The header name- Returns:
- The header value or null
-
getHeaderNames
Get the names of all of the headers.- Specified by:
getHeaderNamesin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The header names
-
getHeaders
Get enumeration of all header values with the given name.- Specified by:
getHeadersin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
name- The name- Returns:
- The header values
-
getHeaders
Return the map of headers for this request.- Returns:
- the map of headers for this request
-
getInputStream
Returns an input stream if there has been added some uploaded files.- Specified by:
getInputStreamin interfacejakarta.servlet.ServletRequest- Returns:
- The input stream
- Throws:
IOException- If an I/O related problem occurs
-
getIntHeader
Get the given header as an int.- Specified by:
getIntHeaderin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
name- The header name- Returns:
- The header value or -1 if header not found
-
getLocale
Get the locale of the request. Attempts to decode the Accept-Language header and if not found returns the default locale of the JVM.- Specified by:
getLocalein interfacejakarta.servlet.ServletRequest- Returns:
- The locale
-
getLocales
Return all the accepted locales. This implementation always returns just one.- Specified by:
getLocalesin interfacejakarta.servlet.ServletRequest- Returns:
- The locales
-
getMethod
Get the method. The returned string will be in upper case eg. POST.- Specified by:
getMethodin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The method
-
getParameter
Get the request parameter with the given name.- Specified by:
getParameterin interfacejakarta.servlet.ServletRequest- Parameters:
name- The parameter name- Returns:
- The parameter value, or null
-
getParameterMap
Get the map of all of the parameters.- Specified by:
getParameterMapin interfacejakarta.servlet.ServletRequest- Returns:
- The parameters
-
getParameterNames
Get the names of all of the parameters.- Specified by:
getParameterNamesin interfacejakarta.servlet.ServletRequest- Returns:
- The parameter names
-
getParameterValues
Get the values for the given parameter.- Specified by:
getParameterValuesin interfacejakarta.servlet.ServletRequest- Parameters:
name- The name of the parameter- Returns:
- The return values
-
getPathInfo
Get the path info.- Specified by:
getPathInfoin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The path info
-
getPathTranslated
Always returns null.- Specified by:
getPathTranslatedin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- null
-
getProtocol
Get the protocol.- Specified by:
getProtocolin interfacejakarta.servlet.ServletRequest- Returns:
- Always HTTP/1.1
-
getQueryString
Get the query string part of the request.- Specified by:
getQueryStringin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The query string
-
getReader
This feature is not implemented at this time as we are not supporting binary servlet input. This functionality may be added in the future.- Specified by:
getReaderin interfacejakarta.servlet.ServletRequest- Returns:
- The reader
- Throws:
IOException- If an I/O related problem occurs
-
getRealPath
Deprecated.Use ServletContext.getRealPath(String) instead.Deprecated method - should not be used.- Parameters:
name- The name- Returns:
- The path
-
getRemoteAddr
Get the remote address of the client.- Specified by:
getRemoteAddrin interfacejakarta.servlet.ServletRequest- Returns:
- Always 127.0.0.1
-
getRemoteHost
Get the remote host.- Specified by:
getRemoteHostin interfacejakarta.servlet.ServletRequest- Returns:
- Always localhost
-
getRemoteUser
Return the name of the
userPrincipalif set, otherwise the value of the "REMOTE_USER" header.To set the remote user, create an instance of a
MockPrincipaland set it on the request through the methodsetUserPrincipal(java.security.Principal).- Specified by:
getRemoteUserin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- the name of the remote user
-
getLocalAddr
Return the local address, "127.0.0.1".- Specified by:
getLocalAddrin interfacejakarta.servlet.ServletRequest- Returns:
- "127.0.0.1" as the local address
-
getLocalName
Return the local name, "127.0.0.1".- Specified by:
getLocalNamein interfacejakarta.servlet.ServletRequest- Returns:
- "127.0.0.1" as the local name
-
getLocalPort
public int getLocalPort()Return the local port, 80.- Specified by:
getLocalPortin interfacejakarta.servlet.ServletRequest- Returns:
- 80 as the local port
-
getRemotePort
public int getRemotePort()Return the remote port, 80.- Specified by:
getRemotePortin interfacejakarta.servlet.ServletRequest- Returns:
- 80 as the remote port
-
getRequestDispatcher
Returns a RequestDispatcher for the specified path. The dispatcher will not dispatch to the resource. It only records the specified path so that one can test if the correct path was dispatched to.- Specified by:
getRequestDispatcherin interfacejakarta.servlet.ServletRequest- Parameters:
path- a String specifying the pathname to the resource- Returns:
- a dispatcher for the specified path
-
getRequestedSessionId
Get the requested session id. Always returns the id of the current session.- Specified by:
getRequestedSessionIdin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The session id
-
getRequestURI
Returns context path and servlet path concatenated, typically /applicationClassName/applicationClassName.- Specified by:
getRequestURIin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The path value
- See Also:
-
setRequestURL
Provide a convenience method for setting the request URL.- Parameters:
requestURL- the request URL to set
-
getRequestURL
Returns (an attempt at) a reconstructed URL based on it's constituent parts. If the requestURL property is set this value will be returned instead.- Specified by:
getRequestURLin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- a StringBuffer object containing the reconstructed URL
- See Also:
-
isPost
public boolean isPost()Return whether the request is a post or not.- Returns:
- true if the request is a post, false otherwise
-
getScheme
Get the scheme http, https, or ftp.- Specified by:
getSchemein interfacejakarta.servlet.ServletRequest- Returns:
- the scheme used by this request
-
setScheme
Set the request's scheme, for example http, https, or ftp.- Parameters:
scheme- the request's scheme- Returns:
- the MockRequest object
-
getServerName
Get the host server name to which the request was sent.- Specified by:
getServerNamein interfacejakarta.servlet.ServletRequest- Returns:
- always the host server name
-
setServerName
Sets the host server name to which the request was sent.- Parameters:
serverName- the server name the request was sent to- Returns:
- the MockRequest object
-
getServerPort
public int getServerPort()Returns the port number to which the request was sent.- Specified by:
getServerPortin interfacejakarta.servlet.ServletRequest- Returns:
- the server port to which the request was sent
-
setServerPort
Set the port number to which the request was sent.- Parameters:
serverPort- the port number to which the request was sent- Returns:
- the MockRequest object
-
getContextPath
Returns the portion of the request URI that indicates the context of the request.- Specified by:
getContextPathin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- the portion of the request URI that indicates the context of the request.
-
setContextPath
Set the portion of the request URI that indicates the context of the request.- Parameters:
contextPath- the portion of the request URI that indicates the context of the request.- Returns:
- the MockRequest object
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()Return the servlet context.- Specified by:
getServletContextin interfacejakarta.servlet.ServletRequest- Returns:
- the servlet context.
- Since:
- Servlet 3.0
-
getServletPath
Return a String containing the name or path of the servlet being called.- Specified by:
getServletPathin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- The servlet path
-
setServletPath
Set the string containing the name or path of the servlet being called.- Parameters:
servletPath- a String containing the name or path of the servlet being called- Returns:
- the MockRequest object
-
getSession
public jakarta.servlet.http.HttpSession getSession()Returns the current HttpSession associated with this request.- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- the session associated with this request
-
setSession
Set the current HttpSession associated with this request.- Parameters:
session- the HttpSession to associate with this request- Returns:
- the MockRequest object
-
getSession
public jakarta.servlet.http.HttpSession getSession(boolean create) Returns the current HttpSession associated with this request.- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
create- if true creates a new session if one does not exist- Returns:
- the current HttpSession associated with this request.
-
getUserPrincipal
Get the user principal. If no user principal was set this method will create a user principal for thegetRemoteUser().- Specified by:
getUserPrincipalin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- the user principal
-
setUserPrincipal
Set the user principal.- Parameters:
userPrincipal- the user principal- Returns:
- the MockRequest object
-
initialize
public final void initialize()Reset the request back to a default state. -
reset
public void reset()Delegate to initialize method. -
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()Check whether session id is from a cookie. Always returns true.- Specified by:
isRequestedSessionIdFromCookiein interfacejakarta.servlet.http.HttpServletRequest- Returns:
- Always true
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()Check whether session id is from a url rewrite. Always returns false.- Returns:
- Always false
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()Check whether session id is from a url rewrite. Always returns false.- Specified by:
isRequestedSessionIdFromURLin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- Always false
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()Check whether the session id is valid.- Specified by:
isRequestedSessionIdValidin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- Always true
-
isSecure
public boolean isSecure()Always returns false.- Specified by:
isSecurein interfacejakarta.servlet.ServletRequest- Returns:
- Always false
-
isUserInRole
Returns true if the
authenticated useris included in the given role, false otherwise.To mock up roles for a user, create a
user principaland set the necessary roles. SeeMockPrincipalfor an example.- Specified by:
isUserInRolein interfacejakarta.servlet.http.HttpServletRequest- Parameters:
role- the role name- Returns:
- true if the user is included in the specified role, false otherwise
-
removeAttribute
Remove the given attribute.- Specified by:
removeAttributein interfacejakarta.servlet.ServletRequest- Parameters:
name- The name of the attribute
-
setAttribute
Set the given attribute.- Specified by:
setAttributein interfacejakarta.servlet.ServletRequest- Parameters:
name- The attribute nameo- The value to set
-
setAuthType
Set the auth type.- Parameters:
authType- The auth type
-
setCharacterEncoding
Set the character encoding.- Specified by:
setCharacterEncodingin interfacejakarta.servlet.ServletRequest- Parameters:
encoding- The character encoding- Throws:
UnsupportedEncodingException- If encoding not supported
-
setCookies
public void setCookies(jakarta.servlet.http.Cookie[] theCookies) Set the cookies.- Parameters:
theCookies- The cookies
-
setMethod
Set the method.- Parameters:
method- The method- Returns:
- the MockRequest object
-
setParameter
Set a parameter.- Parameters:
name- The namevalue- The value- Returns:
- the MockRequest object
-
setParameter
Set the specified parameter name to the array of strings.- Parameters:
name- name of the parametervalues- the parameter values- Returns:
- the MockRequest object
-
removeParameter
Remove the specified parameter.- Parameters:
name- the parameter name to remove- Returns:
- the MockRequest object
-
setParameters
Sets a map of parameters.- Parameters:
parameters- the parameters to set- Returns:
- the MockRequest object
-
setPathInfo
Set the path that this request is supposed to be serving. The path is relative to the web application root and should start with a / character- Parameters:
path- specifies the request path to serve- Returns:
- the MockRequest object
-
getForward
Returns the url that was forwarded to, otherwise return null. jakarta.servlet.ServletResponse)- Returns:
- url that was forwarded to
-
getIncludes
Returns the list of server side included url's. jakarta.servlet.ServletResponse)- Returns:
- list of urls that were included
-
toString
Returns the String representation of the mock request. -
getAsyncContext
public jakarta.servlet.AsyncContext getAsyncContext()- Specified by:
getAsyncContextin interfacejakarta.servlet.ServletRequest- Returns:
- null
- See Also:
-
getContentLengthLong
public long getContentLengthLong()- Specified by:
getContentLengthLongin interfacejakarta.servlet.ServletRequest- Returns:
- 0
- See Also:
-
getDispatcherType
public jakarta.servlet.DispatcherType getDispatcherType()- Specified by:
getDispatcherTypein interfacejakarta.servlet.ServletRequest- Returns:
- null
- See Also:
-
getRequestId
- Specified by:
getRequestIdin interfacejakarta.servlet.ServletRequest
-
getProtocolRequestId
- Specified by:
getProtocolRequestIdin interfacejakarta.servlet.ServletRequest
-
getServletConnection
public jakarta.servlet.ServletConnection getServletConnection()- Specified by:
getServletConnectionin interfacejakarta.servlet.ServletRequest
-
isAsyncStarted
public boolean isAsyncStarted()- Specified by:
isAsyncStartedin interfacejakarta.servlet.ServletRequest- Returns:
- false
- See Also:
-
isAsyncSupported
public boolean isAsyncSupported()- Specified by:
isAsyncSupportedin interfacejakarta.servlet.ServletRequest- Returns:
- false
- See Also:
-
startAsync
public jakarta.servlet.AsyncContext startAsync()- Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Returns:
- the (re)initialized AsyncContext
- See Also:
-
startAsync
public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) - Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Parameters:
servletRequest- the ServletRequest used to initialize the AsyncContextservletResponse- the ServletResponse used to initialize the AsyncContext- Returns:
- null
- See Also:
-
authenticate
- Specified by:
authenticatein interfacejakarta.servlet.http.HttpServletRequest- Parameters:
response- TheHttpServletResponseassociated with thisHttpServletRequest- Returns:
- false
- Throws:
IOException- never thrown
-
changeSessionId
- Specified by:
changeSessionIdin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- null
-
getPart
- Specified by:
getPartin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
name- the part name- Returns:
- null
- Throws:
IOException- never thrown
-
getParts
- Specified by:
getPartsin interfacejakarta.servlet.http.HttpServletRequest- Returns:
- null
- Throws:
IOException- never thrown- See Also:
-
login
- Specified by:
loginin interfacejakarta.servlet.http.HttpServletRequest- Parameters:
username- TheStringvalue corresponding to the login identifier of the user.password- The passwordStringcorresponding to the identified user.- See Also:
-
logout
public void logout()- Specified by:
logoutin interfacejakarta.servlet.http.HttpServletRequest- See Also:
-
upgrade
- Specified by:
upgradein interfacejakarta.servlet.http.HttpServletRequest- Parameters:
handlerClass- TheHttpUpgradeHandlerclass used for the upgrade.- Returns:
- null
- Throws:
IOException- never thrown- See Also:
-