Package org.apache.catalina.core
Class DummyRequest
- java.lang.Object
-
- org.apache.catalina.core.DummyRequest
-
- All Implemented Interfaces:
jakarta.servlet.http.HttpServletRequest,jakarta.servlet.ServletRequest,HttpRequest,Request
public class DummyRequest extends Object implements HttpRequest, jakarta.servlet.http.HttpServletRequest
Dummy request object, used for request dispatcher mapping, as well as JSP precompilation.- Version:
- $Revision: 1.5.6.2 $ $Date: 2008/04/17 18:37:07 $
- Author:
- Remy Maucherat
-
-
Field Summary
Fields Modifier and Type Field Description protected booleancheckRestrictedResourcesWhether or not access to resources in WEB-INF or META-INF needs to be checked.protected jakarta.servlet.FilterChainfilterChainprotected StringpathInfoprotected StringqueryStringprotected StringservletPathprotected Wrapperwrapper
-
Constructor Summary
Constructors Constructor Description DummyRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAsyncListener(jakarta.servlet.AsyncListener listener)voidaddAsyncListener(jakarta.servlet.AsyncListener listener, jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)voidaddCookie(jakarta.servlet.http.Cookie cookie)Add a Cookie to the set of Cookies associated with this Request.voidaddHeader(String name, String value)Add a Header to the set of Headers associated with this Request.voidaddLocale(Locale locale)Add a Locale to the set of preferred Locales for this Request.voidaddParameter(String name, String[] values)Add a parameter name and corresponding set of values to this Request.booleanauthenticate(jakarta.servlet.http.HttpServletResponse response)StringchangeSessionId()Change the ID of the session that this request is associated with.voidclearCookies()Clear the collection of Cookies associated with this Request.voidclearHeaders()Clear the collection of Headers associated with this Request.voidclearLocales()Clear the collection of Locales associated with this Request.voidclearParameters()Clear the collection of parameters associated with this Request.jakarta.servlet.ServletInputStreamcreateInputStream()Create and return a ServletInputStream to read the content associated with this Request.voiddisableAsyncSupport()Disables async support on this request.voidfinishRequest()Perform whatever actions are required to flush and close the input stream or reader, in a single operation.StringgenerateSessionId()This object does not implement a session ID generator.jakarta.servlet.AsyncContextgetAsyncContext()longgetAsyncTimeout()ObjectgetAttribute(String name)Enumeration<String>getAttributeNames()StringgetAuthorization()Return the authorization credentials sent with this request.StringgetAuthType()StringgetCharacterEncoding()booleangetCheckRestrictedResources()Return whether or not access to resources under WEB-INF or META-INF needs to be checked.ConnectorgetConnector()Return the Connector through which this Request was received.intgetContentLength()longgetContentLengthLong()StringgetContentType()ContextgetContext()Return the Context within which this Request is being processed.StringgetContextPath()jakarta.servlet.http.Cookie[]getCookies()longgetDateHeader(String name)StringgetDecodedRequestURI()Get the decoded request URI.jakarta.servlet.DispatcherTypegetDispatcherType()jakarta.servlet.FilterChaingetFilterChain()Get filter chain associated with the request.StringgetHeader(String name)Enumeration<String>getHeaderNames()Enumeration<String>getHeaders(String name)HostgetHost()Return the Host within which this Request is being processed.StringgetInfo()Return descriptive information about this Request implementation and the corresponding version number, in the format<description>/<version>.jakarta.servlet.ServletInputStreamgetInputStream()intgetIntHeader(String name)StringgetJrouteId()Gets the jroute id of this request, which may have been sent as a separateJROUTEcookie or appended to the session identifier encoded in the URI (if cookies have been disabled).StringgetLocalAddr()LocalegetLocale()Enumeration<Locale>getLocales()StringgetLocalName()intgetLocalPort()StringgetMethod()ObjectgetNote(String name)Return the object bound with the specified name to the internal notes for this request, ornullif no such binding exists.Iterator<String>getNoteNames()Return an Iterator containing the String names of all notes bindings that exist for this request.StringgetParameter(String name)Map<String,String[]>getParameterMap()Enumeration<String>getParameterNames()String[]getParameterValues(String name)jakarta.servlet.http.PartgetPart(String name)Collection<jakarta.servlet.http.Part>getParts()StringgetPathInfo()StringgetPathTranslated()StringgetProtocol()StringgetProtocolRequestId()StringgetQueryString()BufferedReadergetReader()StringgetRealPath(String path)StringgetRemoteAddr()StringgetRemoteHost()intgetRemotePort()StringgetRemoteUser()jakarta.servlet.ServletRequestgetRequest()Return theServletRequestfor which this object is the facade.jakarta.servlet.ServletRequestgetRequest(boolean maskDefaultContextMapping)Return theServletRequestfor which this object is the facade.jakarta.servlet.RequestDispatchergetRequestDispatcher(String path)StringgetRequestedSessionId()StringgetRequestId()org.glassfish.grizzly.http.util.DataChunkgetRequestPathMB()Get the request path.StringgetRequestURI()StringBuffergetRequestURL()ResponsegetResponse()Return the Response with which this Request is associated.StringgetScheme()StringgetServerName()intgetServerPort()jakarta.servlet.ServletConnectiongetServletConnection()jakarta.servlet.ServletContextgetServletContext()Gets the servlet context to which this servlet request was last dispatched.StringgetServletPath()jakarta.servlet.http.HttpSessiongetSession()jakarta.servlet.http.HttpSessiongetSession(boolean create)SessiongetSessionInternal(boolean create)Gets the session associated with this Request, creating one if necessary and requested.SocketgetSocket()Return the Socket (if any) through which this Request was received.InputStreamgetStream()Return the input stream associated with this Request.PrincipalgetUserPrincipal()WrappergetWrapper()Return the Wrapper within which this Request is being processed.booleanisAsyncStarted()booleanisAsyncSupported()booleanisRequestedSessionIdFromCookie()booleanisRequestedSessionIdFromUrl()booleanisRequestedSessionIdFromURL()booleanisRequestedSessionIdValid()booleanisSecure()booleanisSetAsyncTimeoutCalled()booleanisUserInRole(String role)SessionlockSession()voidlogin(String username, String password)voidlogout()voidrecycle()Release all object references, and initialize instance variables, in preparation for reuse of this object.voidremoveAttribute(String name)voidremoveNote(String name)Remove any object bound to the specified name in the internal notes for this request.voidreplayPayload(byte[] payloadByteArray)voidsetAsyncTimeout(long timeout)voidsetAttribute(String name, Object value)voidsetAuthType(String authType)Set the authentication type used for this request, if any; otherwise set the type tonull.voidsetCharacterEncoding(String enc)voidsetCheckRestrictedResources(boolean check)Set whether or not access to resources under WEB-INF or META-INF needs to be checked.voidsetConnector(Connector connector)Set the Connector through which this Request was received.voidsetContentLength(int length)Set the content length associated with this Request.voidsetContentType(String type)Set the content type (and optionally the character encoding) associated with this Request.voidsetContext(Context context)Set the Context within which this Request is being processed.voidsetFilterChain(jakarta.servlet.FilterChain filterChain)Set filter chain associated with the request.voidsetHost(Host host)Set the Host within which this Request is being processed.voidsetMethod(String method)Set the HTTP request method used for this Request.voidsetNote(String name, Object value)Bind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name.voidsetPathInfo(String path)Set the path information for this Request.voidsetProtocol(String protocol)Set the protocol name and version associated with this Request.voidsetQueryString(String query)Set the query string for this Request.voidsetRemoteAddr(String remoteAddr)Set the remote IP address associated with this Request.voidsetRemoteHost(String remoteHost)voidsetRequestedSessionCookie(boolean flag)Set a flag indicating whether or not the requested session ID for this request came in through a cookie.voidsetRequestedSessionCookiePath(String cookiePath)Sets the requested session cookie path, see IT 7426voidsetRequestedSessionId(String id)Set the requested session ID for this request.voidsetRequestedSessionURL(boolean flag)Set a flag indicating whether or not the requested session ID for this request came in through a URL.voidsetRequestURI(String uri)Set the unparsed request URI for this Request.voidsetResponse(Response response)Set the Response with which this Request is associated.voidsetSecure(boolean secure)Set the value to be returned byisSecure()for this Request.voidsetServerName(String name)Set the name of the server (virtual host) to process this request.voidsetServerPort(int port)Set the port number of the server to process this request.voidsetServletPath(String path)Set the servlet path for this Request.voidsetSocket(Socket socket)Set the Socket (if any) through which this Request was received.voidsetStream(InputStream input)Set the input stream associated with this Request.voidsetUserPrincipal(Principal principal)Set the Principal who has been authenticated for this Request.voidsetWrapper(Wrapper wrapper)Set the Wrapper within which this Request is being processed.jakarta.servlet.AsyncContextstartAsync()jakarta.servlet.AsyncContextstartAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)voidunlockSession()<T extends jakarta.servlet.http.HttpUpgradeHandler>
Tupgrade(Class<T> handlerClass)
-
-
-
Field Detail
-
queryString
protected String queryString
-
pathInfo
protected String pathInfo
-
servletPath
protected String servletPath
-
wrapper
protected Wrapper wrapper
-
filterChain
protected jakarta.servlet.FilterChain filterChain
-
checkRestrictedResources
protected boolean checkRestrictedResources
Whether or not access to resources in WEB-INF or META-INF needs to be checked.
-
-
Method Detail
-
getContextPath
public String getContextPath()
- Specified by:
getContextPathin interfacejakarta.servlet.http.HttpServletRequest
-
getRequest
public jakarta.servlet.ServletRequest getRequest()
Description copied from interface:RequestReturn theServletRequestfor which this object is the facade.- Specified by:
getRequestin interfaceRequest
-
getRequest
public jakarta.servlet.ServletRequest getRequest(boolean maskDefaultContextMapping)
Description copied from interface:RequestReturn theServletRequestfor which this object is the facade.- Specified by:
getRequestin interfaceRequest- Parameters:
maskDefaultContextMapping- true if the fact that a request received at the root context was mapped to a default-web-module will be masked, false otherwise
-
getDecodedRequestURI
public String getDecodedRequestURI()
Description copied from interface:HttpRequestGet the decoded request URI.- Specified by:
getDecodedRequestURIin interfaceHttpRequest- Returns:
- the URL decoded request URI
-
getFilterChain
public jakarta.servlet.FilterChain getFilterChain()
Description copied from interface:RequestGet filter chain associated with the request.- Specified by:
getFilterChainin interfaceRequest
-
setFilterChain
public void setFilterChain(jakarta.servlet.FilterChain filterChain)
Description copied from interface:RequestSet filter chain associated with the request.- Specified by:
setFilterChainin interfaceRequest- Parameters:
filterChain- new filter chain
-
getQueryString
public String getQueryString()
- Specified by:
getQueryStringin interfacejakarta.servlet.http.HttpServletRequest
-
setQueryString
public void setQueryString(String query)
Description copied from interface:HttpRequestSet the query string for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Specified by:
setQueryStringin interfaceHttpRequest- Parameters:
query- The query string
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfoin interfacejakarta.servlet.http.HttpServletRequest
-
setPathInfo
public void setPathInfo(String path)
Description copied from interface:HttpRequestSet the path information for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.- Specified by:
setPathInfoin interfaceHttpRequest- Parameters:
path- The path information
-
getRequestPathMB
public org.glassfish.grizzly.http.util.DataChunk getRequestPathMB()
Description copied from interface:HttpRequestGet the request path.- Specified by:
getRequestPathMBin interfaceHttpRequest- Returns:
- the request path
-
getServletPath
public String getServletPath()
- Specified by:
getServletPathin interfacejakarta.servlet.http.HttpServletRequest
-
setServletPath
public void setServletPath(String path)
Description copied from interface:HttpRequestSet the servlet path for this Request. This will normally be called when the associated Context is mapping the Request to a particular Wrapper.- Specified by:
setServletPathin interfaceHttpRequest- Parameters:
path- The servlet path
-
getWrapper
public Wrapper getWrapper()
Description copied from interface:RequestReturn the Wrapper within which this Request is being processed.- Specified by:
getWrapperin interfaceRequest
-
setWrapper
public void setWrapper(Wrapper wrapper)
Description copied from interface:RequestSet the Wrapper within which this Request is being processed. This must be called as soon as the appropriate Wrapper is identified, and before the Request is ultimately passed to an application servlet.- Specified by:
setWrapperin interfaceRequest- Parameters:
wrapper- The newly associated Wrapper
-
setMethod
public void setMethod(String method)
Description copied from interface:HttpRequestSet the HTTP request method used for this Request.- Specified by:
setMethodin interfaceHttpRequest- Parameters:
method- The request method
-
getMethod
public String getMethod()
- Specified by:
getMethodin interfacejakarta.servlet.http.HttpServletRequest
-
getAuthorization
public String getAuthorization()
Description copied from interface:RequestReturn the authorization credentials sent with this request.- Specified by:
getAuthorizationin interfaceRequest
-
getConnector
public Connector getConnector()
Description copied from interface:RequestReturn the Connector through which this Request was received.- Specified by:
getConnectorin interfaceRequest
-
setConnector
public void setConnector(Connector connector)
Description copied from interface:RequestSet the Connector through which this Request was received.- Specified by:
setConnectorin interfaceRequest- Parameters:
connector- The new connector
-
getContext
public Context getContext()
Description copied from interface:RequestReturn the Context within which this Request is being processed.- Specified by:
getContextin interfaceRequest
-
setContext
public void setContext(Context context)
Description copied from interface:RequestSet the Context within which this Request is being processed. This must be called as soon as the appropriate Context is identified, because it identifies the value to be returned bygetContextPath(), and thus enables parsing of the request URI.- Specified by:
setContextin interfaceRequest- Parameters:
context- The newly associated Context
-
getHost
public Host getHost()
Description copied from interface:RequestReturn the Host within which this Request is being processed.
-
setHost
public void setHost(Host host)
Description copied from interface:RequestSet the Host within which this Request is being processed. This must be called as soon as the appropriate Host is identified, and before the Request is passed to a context.
-
getInfo
public String getInfo()
Description copied from interface:RequestReturn descriptive information about this Request implementation and the corresponding version number, in the format<description>/<version>.
-
getResponse
public Response getResponse()
Description copied from interface:RequestReturn the Response with which this Request is associated.- Specified by:
getResponsein interfaceRequest
-
setResponse
public void setResponse(Response response)
Description copied from interface:RequestSet the Response with which this Request is associated.- Specified by:
setResponsein interfaceRequest- Parameters:
response- The new associated response
-
getSocket
public Socket getSocket()
Description copied from interface:RequestReturn the Socket (if any) through which this Request was received. This should only be used to access underlying state information about this Socket, such as the SSLSession associated with an SSLSocket.
-
setSocket
public void setSocket(Socket socket)
Description copied from interface:RequestSet the Socket (if any) through which this Request was received.
-
getStream
public InputStream getStream()
Description copied from interface:RequestReturn the input stream associated with this Request.
-
setStream
public void setStream(InputStream input)
Description copied from interface:RequestSet the input stream associated with this Request.
-
addLocale
public void addLocale(Locale locale)
Description copied from interface:HttpRequestAdd a Locale to the set of preferred Locales for this Request. The first added Locale will be the first one returned by getLocales().- Specified by:
addLocalein interfaceHttpRequest- Parameters:
locale- The new preferred Locale
-
createInputStream
public jakarta.servlet.ServletInputStream createInputStream() throws IOExceptionDescription copied from interface:RequestCreate and return a ServletInputStream to read the content associated with this Request.- Specified by:
createInputStreamin interfaceRequest- Throws:
IOException- if an input/output error occurs
-
finishRequest
public void finishRequest() throws IOExceptionDescription copied from interface:RequestPerform whatever actions are required to flush and close the input stream or reader, in a single operation.- Specified by:
finishRequestin interfaceRequest- Throws:
IOException- if an input/output error occurs
-
getNote
public Object getNote(String name)
Description copied from interface:RequestReturn the object bound with the specified name to the internal notes for this request, ornullif no such binding exists.
-
getNoteNames
public Iterator<String> getNoteNames()
Description copied from interface:RequestReturn an Iterator containing the String names of all notes bindings that exist for this request.- Specified by:
getNoteNamesin interfaceRequest
-
removeNote
public void removeNote(String name)
Description copied from interface:RequestRemove any object bound to the specified name in the internal notes for this request.- Specified by:
removeNotein interfaceRequest- Parameters:
name- Name of the note to be removed
-
setContentType
public void setContentType(String type)
Description copied from interface:RequestSet the content type (and optionally the character encoding) associated with this Request. For example,text/html; charset=ISO-8859-4.- Specified by:
setContentTypein interfaceRequest- Parameters:
type- The new content type
-
setNote
public void setNote(String name, Object value)
Description copied from interface:RequestBind an object to a specified name in the internal notes associated with this request, replacing any existing binding for this name.
-
setProtocol
public void setProtocol(String protocol)
Description copied from interface:RequestSet the protocol name and version associated with this Request.- Specified by:
setProtocolin interfaceRequest- Parameters:
protocol- Protocol name and version
-
setRemoteAddr
public void setRemoteAddr(String remoteAddr)
Description copied from interface:RequestSet the remote IP address associated with this Request. NOTE: This value will be used to resolve the value forgetRemoteHost()if that method is called.- Specified by:
setRemoteAddrin interfaceRequest- Parameters:
remoteAddr- The remote IP address
-
setRemoteHost
public void setRemoteHost(String remoteHost)
-
setServerName
public void setServerName(String name)
Description copied from interface:RequestSet the name of the server (virtual host) to process this request.- Specified by:
setServerNamein interfaceRequest- Parameters:
name- The server name
-
setServerPort
public void setServerPort(int port)
Description copied from interface:RequestSet the port number of the server to process this request.- Specified by:
setServerPortin interfaceRequest- Parameters:
port- The server port
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttributein interfacejakarta.servlet.ServletRequest
-
getAttributeNames
public Enumeration<String> getAttributeNames()
- Specified by:
getAttributeNamesin interfacejakarta.servlet.ServletRequest
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfacejakarta.servlet.ServletRequest
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin interfacejakarta.servlet.ServletRequest
-
getContentLengthLong
public long getContentLengthLong()
- Specified by:
getContentLengthLongin interfacejakarta.servlet.ServletRequest
-
setContentLength
public void setContentLength(int length)
Description copied from interface:RequestSet the content length associated with this Request.- Specified by:
setContentLengthin interfaceRequest- Parameters:
length- The new content length
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfacejakarta.servlet.ServletRequest
-
getInputStream
public jakarta.servlet.ServletInputStream getInputStream() throws IOException- Specified by:
getInputStreamin interfacejakarta.servlet.ServletRequest- Throws:
IOException
-
getLocale
public Locale getLocale()
- Specified by:
getLocalein interfacejakarta.servlet.ServletRequest
-
getLocales
public Enumeration<Locale> getLocales()
- Specified by:
getLocalesin interfacejakarta.servlet.ServletRequest
-
getProtocol
public String getProtocol()
- Specified by:
getProtocolin interfacejakarta.servlet.ServletRequest
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReaderin interfacejakarta.servlet.ServletRequest- Throws:
IOException
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddrin interfacejakarta.servlet.ServletRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHostin interfacejakarta.servlet.ServletRequest
-
getScheme
public String getScheme()
- Specified by:
getSchemein interfacejakarta.servlet.ServletRequest
-
getServerName
public String getServerName()
- Specified by:
getServerNamein interfacejakarta.servlet.ServletRequest
-
getServerPort
public int getServerPort()
- Specified by:
getServerPortin interfacejakarta.servlet.ServletRequest
-
isSecure
public boolean isSecure()
- Specified by:
isSecurein interfacejakarta.servlet.ServletRequest
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttributein interfacejakarta.servlet.ServletRequest
-
setAttribute
public void setAttribute(String name, Object value)
- Specified by:
setAttributein interfacejakarta.servlet.ServletRequest
-
setCharacterEncoding
public void setCharacterEncoding(String enc) throws UnsupportedEncodingException
- Specified by:
setCharacterEncodingin interfacejakarta.servlet.ServletRequest- Throws:
UnsupportedEncodingException
-
addCookie
public void addCookie(jakarta.servlet.http.Cookie cookie)
Description copied from interface:HttpRequestAdd a Cookie to the set of Cookies associated with this Request.- Specified by:
addCookiein interfaceHttpRequest- Parameters:
cookie- The new cookie
-
addHeader
public void addHeader(String name, String value)
Description copied from interface:HttpRequestAdd a Header to the set of Headers associated with this Request.- Specified by:
addHeaderin interfaceHttpRequest- Parameters:
name- The new header namevalue- The new header value
-
addParameter
public void addParameter(String name, String[] values)
Description copied from interface:HttpRequestAdd a parameter name and corresponding set of values to this Request. (This is used when restoring the original request on a form based login).- Specified by:
addParameterin interfaceHttpRequest- Parameters:
name- Name of this request parametervalues- Corresponding values for this request parameter
-
clearCookies
public void clearCookies()
Description copied from interface:HttpRequestClear the collection of Cookies associated with this Request.- Specified by:
clearCookiesin interfaceHttpRequest
-
clearHeaders
public void clearHeaders()
Description copied from interface:HttpRequestClear the collection of Headers associated with this Request.- Specified by:
clearHeadersin interfaceHttpRequest
-
clearLocales
public void clearLocales()
Description copied from interface:HttpRequestClear the collection of Locales associated with this Request.- Specified by:
clearLocalesin interfaceHttpRequest
-
clearParameters
public void clearParameters()
Description copied from interface:HttpRequestClear the collection of parameters associated with this Request.- Specified by:
clearParametersin interfaceHttpRequest
-
replayPayload
public void replayPayload(byte[] payloadByteArray)
- Specified by:
replayPayloadin interfaceHttpRequest
-
recycle
public void recycle()
Description copied from interface:RequestRelease all object references, and initialize instance variables, in preparation for reuse of this object.
-
setAuthType
public void setAuthType(String authType)
Description copied from interface:HttpRequestSet the authentication type used for this request, if any; otherwise set the type tonull. Typical values are "BASIC", "DIGEST", or "SSL".- Specified by:
setAuthTypein interfaceHttpRequest- Parameters:
authType- The authentication type used
-
setRequestedSessionCookie
public void setRequestedSessionCookie(boolean flag)
Description copied from interface:HttpRequestSet a flag indicating whether or not the requested session ID for this request came in through a cookie. This is normally called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestedSessionCookiein interfaceHttpRequest- Parameters:
flag- The new flag
-
setRequestedSessionId
public void setRequestedSessionId(String id)
Description copied from interface:HttpRequestSet the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestedSessionIdin interfaceHttpRequest- Parameters:
id- The new session id
-
setRequestedSessionURL
public void setRequestedSessionURL(boolean flag)
Description copied from interface:HttpRequestSet a flag indicating whether or not the requested session ID for this request came in through a URL. This is normally called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestedSessionURLin interfaceHttpRequest- Parameters:
flag- The new flag
-
setRequestURI
public void setRequestURI(String uri)
Description copied from interface:HttpRequestSet the unparsed request URI for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestURIin interfaceHttpRequest- Parameters:
uri- The request URI
-
setSecure
public void setSecure(boolean secure)
Description copied from interface:RequestSet the value to be returned byisSecure()for this Request.
-
setUserPrincipal
public void setUserPrincipal(Principal principal)
Description copied from interface:HttpRequestSet the Principal who has been authenticated for this Request. This value is also used to calculate the value to be returned by thegetRemoteUser()method.- Specified by:
setUserPrincipalin interfaceHttpRequest- Parameters:
principal- The user Principal
-
getParameter
public String getParameter(String name)
- Specified by:
getParameterin interfacejakarta.servlet.ServletRequest
-
getParameterMap
public Map<String,String[]> getParameterMap()
- Specified by:
getParameterMapin interfacejakarta.servlet.ServletRequest
-
getParameterNames
public Enumeration<String> getParameterNames()
- Specified by:
getParameterNamesin interfacejakarta.servlet.ServletRequest
-
getParameterValues
public String[] getParameterValues(String name)
- Specified by:
getParameterValuesin interfacejakarta.servlet.ServletRequest
-
getRequestDispatcher
public jakarta.servlet.RequestDispatcher getRequestDispatcher(String path)
- Specified by:
getRequestDispatcherin interfacejakarta.servlet.ServletRequest
-
getAuthType
public String getAuthType()
- Specified by:
getAuthTypein interfacejakarta.servlet.http.HttpServletRequest
-
getCookies
public jakarta.servlet.http.Cookie[] getCookies()
- Specified by:
getCookiesin interfacejakarta.servlet.http.HttpServletRequest
-
getDateHeader
public long getDateHeader(String name)
- Specified by:
getDateHeaderin interfacejakarta.servlet.http.HttpServletRequest
-
getHeader
public String getHeader(String name)
- Specified by:
getHeaderin interfacejakarta.servlet.http.HttpServletRequest
-
getHeaders
public Enumeration<String> getHeaders(String name)
- Specified by:
getHeadersin interfacejakarta.servlet.http.HttpServletRequest
-
getHeaderNames
public Enumeration<String> getHeaderNames()
- Specified by:
getHeaderNamesin interfacejakarta.servlet.http.HttpServletRequest
-
getIntHeader
public int getIntHeader(String name)
- Specified by:
getIntHeaderin interfacejakarta.servlet.http.HttpServletRequest
-
getPathTranslated
public String getPathTranslated()
- Specified by:
getPathTranslatedin interfacejakarta.servlet.http.HttpServletRequest
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUserin interfacejakarta.servlet.http.HttpServletRequest
-
getRequestedSessionId
public String getRequestedSessionId()
- Specified by:
getRequestedSessionIdin interfacejakarta.servlet.http.HttpServletRequest
-
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURIin interfacejakarta.servlet.http.HttpServletRequest
-
getRequestURL
public StringBuffer getRequestURL()
- Specified by:
getRequestURLin interfacejakarta.servlet.http.HttpServletRequest
-
getSession
public jakarta.servlet.http.HttpSession getSession()
- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest
-
getSession
public jakarta.servlet.http.HttpSession getSession(boolean create)
- Specified by:
getSessionin interfacejakarta.servlet.http.HttpServletRequest
-
getSessionInternal
public Session getSessionInternal(boolean create)
Description copied from interface:RequestGets the session associated with this Request, creating one if necessary and requested.- Specified by:
getSessionInternalin interfaceRequest- Parameters:
create- true if a new session is to be created if one does not already exist, false otherwise
-
changeSessionId
public String changeSessionId()
Description copied from interface:RequestChange the ID of the session that this request is associated with. There are several things that may trigger an ID change. These include moving between nodes in a cluster and session fixation prevention during the authentication process.- Specified by:
changeSessionIdin interfacejakarta.servlet.http.HttpServletRequest- Specified by:
changeSessionIdin interfaceRequest
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
- Specified by:
isRequestedSessionIdFromCookiein interfacejakarta.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
- Specified by:
isRequestedSessionIdFromURLin interfacejakarta.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
- Specified by:
isRequestedSessionIdValidin interfacejakarta.servlet.http.HttpServletRequest
-
setRequestedSessionCookiePath
public void setRequestedSessionCookiePath(String cookiePath)
Description copied from interface:RequestSets the requested session cookie path, see IT 7426- Specified by:
setRequestedSessionCookiePathin interfaceRequest
-
isUserInRole
public boolean isUserInRole(String role)
- Specified by:
isUserInRolein interfacejakarta.servlet.http.HttpServletRequest
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipalin interfacejakarta.servlet.http.HttpServletRequest
-
getLocalAddr
public String getLocalAddr()
- Specified by:
getLocalAddrin interfacejakarta.servlet.ServletRequest
-
getLocalName
public String getLocalName()
- Specified by:
getLocalNamein interfacejakarta.servlet.ServletRequest
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPortin interfacejakarta.servlet.ServletRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePortin interfacejakarta.servlet.ServletRequest
-
getDispatcherType
public jakarta.servlet.DispatcherType getDispatcherType()
- Specified by:
getDispatcherTypein interfacejakarta.servlet.ServletRequest
-
startAsync
public jakarta.servlet.AsyncContext startAsync() throws IllegalStateException- Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Throws:
IllegalStateException
-
startAsync
public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) throws IllegalStateException- Specified by:
startAsyncin interfacejakarta.servlet.ServletRequest- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()
- Specified by:
isAsyncStartedin interfacejakarta.servlet.ServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()
- Specified by:
isAsyncSupportedin interfacejakarta.servlet.ServletRequest
-
setAsyncTimeout
public void setAsyncTimeout(long timeout)
-
getAsyncTimeout
public long getAsyncTimeout()
-
getAsyncContext
public jakarta.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContextin interfacejakarta.servlet.ServletRequest
-
addAsyncListener
public void addAsyncListener(jakarta.servlet.AsyncListener listener)
-
addAsyncListener
public void addAsyncListener(jakarta.servlet.AsyncListener listener, jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
-
isSetAsyncTimeoutCalled
public boolean isSetAsyncTimeoutCalled()
-
disableAsyncSupport
public void disableAsyncSupport()
Description copied from interface:RequestDisables async support on this request.- Specified by:
disableAsyncSupportin interfaceRequest
-
getParts
public Collection<jakarta.servlet.http.Part> getParts()
- Specified by:
getPartsin interfacejakarta.servlet.http.HttpServletRequest
-
getPart
public jakarta.servlet.http.Part getPart(String name)
- Specified by:
getPartin interfacejakarta.servlet.http.HttpServletRequest
-
authenticate
public boolean authenticate(jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException- Specified by:
authenticatein interfacejakarta.servlet.http.HttpServletRequest- Throws:
IOExceptionjakarta.servlet.ServletException
-
login
public void login(String username, String password) throws jakarta.servlet.ServletException
- Specified by:
loginin interfacejakarta.servlet.http.HttpServletRequest- Throws:
jakarta.servlet.ServletException
-
logout
public void logout() throws jakarta.servlet.ServletException- Specified by:
logoutin interfacejakarta.servlet.http.HttpServletRequest- Throws:
jakarta.servlet.ServletException
-
upgrade
public <T extends jakarta.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> handlerClass)
- Specified by:
upgradein interfacejakarta.servlet.http.HttpServletRequest
-
setCheckRestrictedResources
public void setCheckRestrictedResources(boolean check)
Set whether or not access to resources under WEB-INF or META-INF needs to be checked.- Specified by:
setCheckRestrictedResourcesin interfaceRequest- Parameters:
check- whether access needs to be checked
-
getCheckRestrictedResources
public boolean getCheckRestrictedResources()
Return whether or not access to resources under WEB-INF or META-INF needs to be checked.- Specified by:
getCheckRestrictedResourcesin interfaceRequest
-
getJrouteId
public String getJrouteId()
Gets the jroute id of this request, which may have been sent as a separateJROUTEcookie or appended to the session identifier encoded in the URI (if cookies have been disabled).- Specified by:
getJrouteIdin interfaceRequest- Returns:
- The jroute id of this request, or null if this request does not carry any jroute id
-
generateSessionId
public String generateSessionId()
This object does not implement a session ID generator. Provide a dummy implementation so that the default one will be used.- Specified by:
generateSessionIdin interfaceRequest- Returns:
null
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
Gets the servlet context to which this servlet request was last dispatched.- Specified by:
getServletContextin interfacejakarta.servlet.ServletRequest- Returns:
- the servlet context to which this servlet request was last dispatched
-
lockSession
public Session lockSession()
- Specified by:
lockSessionin interfaceRequest
-
unlockSession
public void unlockSession()
- Specified by:
unlockSessionin interfaceRequest
-
getRequestId
public String getRequestId()
- Specified by:
getRequestIdin interfacejakarta.servlet.ServletRequest
-
getProtocolRequestId
public String getProtocolRequestId()
- Specified by:
getProtocolRequestIdin interfacejakarta.servlet.ServletRequest
-
getServletConnection
public jakarta.servlet.ServletConnection getServletConnection()
- Specified by:
getServletConnectionin interfacejakarta.servlet.ServletRequest
-
-