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 boolean
checkRestrictedResources
Whether or not access to resources in WEB-INF or META-INF needs to be checked.protected jakarta.servlet.FilterChain
filterChain
protected String
pathInfo
protected String
queryString
protected String
servletPath
protected Wrapper
wrapper
-
Constructor Summary
Constructors Constructor Description DummyRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAsyncListener(jakarta.servlet.AsyncListener listener)
void
addAsyncListener(jakarta.servlet.AsyncListener listener, jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
void
addCookie(jakarta.servlet.http.Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request.void
addHeader(String name, String value)
Add a Header to the set of Headers associated with this Request.void
addLocale(Locale locale)
Add a Locale to the set of preferred Locales for this Request.void
addParameter(String name, String[] values)
Add a parameter name and corresponding set of values to this Request.boolean
authenticate(jakarta.servlet.http.HttpServletResponse response)
String
changeSessionId()
Change the ID of the session that this request is associated with.void
clearCookies()
Clear the collection of Cookies associated with this Request.void
clearHeaders()
Clear the collection of Headers associated with this Request.void
clearLocales()
Clear the collection of Locales associated with this Request.void
clearParameters()
Clear the collection of parameters associated with this Request.jakarta.servlet.ServletInputStream
createInputStream()
Create and return a ServletInputStream to read the content associated with this Request.void
disableAsyncSupport()
Disables async support on this request.void
finishRequest()
Perform whatever actions are required to flush and close the input stream or reader, in a single operation.String
generateSessionId()
This object does not implement a session ID generator.jakarta.servlet.AsyncContext
getAsyncContext()
long
getAsyncTimeout()
Object
getAttribute(String name)
Enumeration<String>
getAttributeNames()
String
getAuthorization()
Return the authorization credentials sent with this request.String
getAuthType()
String
getCharacterEncoding()
boolean
getCheckRestrictedResources()
Return whether or not access to resources under WEB-INF or META-INF needs to be checked.Connector
getConnector()
Return the Connector through which this Request was received.int
getContentLength()
long
getContentLengthLong()
String
getContentType()
Context
getContext()
Return the Context within which this Request is being processed.String
getContextPath()
jakarta.servlet.http.Cookie[]
getCookies()
long
getDateHeader(String name)
String
getDecodedRequestURI()
Get the decoded request URI.jakarta.servlet.DispatcherType
getDispatcherType()
jakarta.servlet.FilterChain
getFilterChain()
Get filter chain associated with the request.String
getHeader(String name)
Enumeration<String>
getHeaderNames()
Enumeration<String>
getHeaders(String name)
Host
getHost()
Return the Host within which this Request is being processed.String
getInfo()
Return descriptive information about this Request implementation and the corresponding version number, in the format<description>/<version>
.jakarta.servlet.ServletInputStream
getInputStream()
int
getIntHeader(String name)
String
getJrouteId()
Gets the jroute id of this request, which may have been sent as a separateJROUTE
cookie or appended to the session identifier encoded in the URI (if cookies have been disabled).String
getLocalAddr()
Locale
getLocale()
Enumeration<Locale>
getLocales()
String
getLocalName()
int
getLocalPort()
String
getMethod()
Object
getNote(String name)
Return the object bound with the specified name to the internal notes for this request, ornull
if no such binding exists.Iterator<String>
getNoteNames()
Return an Iterator containing the String names of all notes bindings that exist for this request.String
getParameter(String name)
Map<String,String[]>
getParameterMap()
Enumeration<String>
getParameterNames()
String[]
getParameterValues(String name)
jakarta.servlet.http.Part
getPart(String name)
Collection<jakarta.servlet.http.Part>
getParts()
String
getPathInfo()
String
getPathTranslated()
String
getProtocol()
String
getQueryString()
BufferedReader
getReader()
String
getRealPath(String path)
String
getRemoteAddr()
String
getRemoteHost()
int
getRemotePort()
String
getRemoteUser()
jakarta.servlet.ServletRequest
getRequest()
Return theServletRequest
for which this object is the facade.jakarta.servlet.ServletRequest
getRequest(boolean maskDefaultContextMapping)
Return theServletRequest
for which this object is the facade.jakarta.servlet.RequestDispatcher
getRequestDispatcher(String path)
String
getRequestedSessionId()
org.glassfish.grizzly.http.util.DataChunk
getRequestPathMB()
Get the request path.String
getRequestURI()
StringBuffer
getRequestURL()
Response
getResponse()
Return the Response with which this Request is associated.String
getScheme()
String
getServerName()
int
getServerPort()
jakarta.servlet.ServletContext
getServletContext()
Gets the servlet context to which this servlet request was last dispatched.String
getServletPath()
jakarta.servlet.http.HttpSession
getSession()
jakarta.servlet.http.HttpSession
getSession(boolean create)
Session
getSessionInternal(boolean create)
Gets the session associated with this Request, creating one if necessary and requested.Socket
getSocket()
Return the Socket (if any) through which this Request was received.InputStream
getStream()
Return the input stream associated with this Request.Principal
getUserPrincipal()
Wrapper
getWrapper()
Return the Wrapper within which this Request is being processed.boolean
isAsyncStarted()
boolean
isAsyncSupported()
boolean
isRequestedSessionIdFromCookie()
boolean
isRequestedSessionIdFromUrl()
boolean
isRequestedSessionIdFromURL()
boolean
isRequestedSessionIdValid()
boolean
isSecure()
boolean
isSetAsyncTimeoutCalled()
boolean
isUserInRole(String role)
Session
lockSession()
void
login(String username, String password)
void
logout()
void
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object.void
removeAttribute(String name)
void
removeNote(String name)
Remove any object bound to the specified name in the internal notes for this request.void
replayPayload(byte[] payloadByteArray)
void
setAsyncTimeout(long timeout)
void
setAttribute(String name, Object value)
void
setAuthType(String authType)
Set the authentication type used for this request, if any; otherwise set the type tonull
.void
setCharacterEncoding(String enc)
void
setCheckRestrictedResources(boolean check)
Set whether or not access to resources under WEB-INF or META-INF needs to be checked.void
setConnector(Connector connector)
Set the Connector through which this Request was received.void
setContentLength(int length)
Set the content length associated with this Request.void
setContentType(String type)
Set the content type (and optionally the character encoding) associated with this Request.void
setContext(Context context)
Set the Context within which this Request is being processed.void
setFilterChain(jakarta.servlet.FilterChain filterChain)
Set filter chain associated with the request.void
setHost(Host host)
Set the Host within which this Request is being processed.void
setMethod(String method)
Set the HTTP request method used for this Request.void
setNote(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.void
setPathInfo(String path)
Set the path information for this Request.void
setProtocol(String protocol)
Set the protocol name and version associated with this Request.void
setQueryString(String query)
Set the query string for this Request.void
setRemoteAddr(String remoteAddr)
Set the remote IP address associated with this Request.void
setRemoteHost(String remoteHost)
void
setRequestedSessionCookie(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a cookie.void
setRequestedSessionCookiePath(String cookiePath)
Sets the requested session cookie path, see IT 7426void
setRequestedSessionId(String id)
Set the requested session ID for this request.void
setRequestedSessionURL(boolean flag)
Set a flag indicating whether or not the requested session ID for this request came in through a URL.void
setRequestURI(String uri)
Set the unparsed request URI for this Request.void
setResponse(Response response)
Set the Response with which this Request is associated.void
setSecure(boolean secure)
Set the value to be returned byisSecure()
for this Request.void
setServerName(String name)
Set the name of the server (virtual host) to process this request.void
setServerPort(int port)
Set the port number of the server to process this request.void
setServletPath(String path)
Set the servlet path for this Request.void
setSocket(Socket socket)
Set the Socket (if any) through which this Request was received.void
setStream(InputStream input)
Set the input stream associated with this Request.void
setUserPrincipal(Principal principal)
Set the Principal who has been authenticated for this Request.void
setWrapper(Wrapper wrapper)
Set the Wrapper within which this Request is being processed.jakarta.servlet.AsyncContext
startAsync()
jakarta.servlet.AsyncContext
startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse)
void
unlockSession()
<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:
getContextPath
in interfacejakarta.servlet.http.HttpServletRequest
-
getRequest
public jakarta.servlet.ServletRequest getRequest()
Description copied from interface:Request
Return theServletRequest
for which this object is the facade.- Specified by:
getRequest
in interfaceRequest
-
getRequest
public jakarta.servlet.ServletRequest getRequest(boolean maskDefaultContextMapping)
Description copied from interface:Request
Return theServletRequest
for which this object is the facade.- Specified by:
getRequest
in 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:HttpRequest
Get the decoded request URI.- Specified by:
getDecodedRequestURI
in interfaceHttpRequest
- Returns:
- the URL decoded request URI
-
getFilterChain
public jakarta.servlet.FilterChain getFilterChain()
Description copied from interface:Request
Get filter chain associated with the request.- Specified by:
getFilterChain
in interfaceRequest
-
setFilterChain
public void setFilterChain(jakarta.servlet.FilterChain filterChain)
Description copied from interface:Request
Set filter chain associated with the request.- Specified by:
setFilterChain
in interfaceRequest
- Parameters:
filterChain
- new filter chain
-
getQueryString
public String getQueryString()
- Specified by:
getQueryString
in interfacejakarta.servlet.http.HttpServletRequest
-
setQueryString
public void setQueryString(String query)
Description copied from interface:HttpRequest
Set the query string for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Specified by:
setQueryString
in interfaceHttpRequest
- Parameters:
query
- The query string
-
getPathInfo
public String getPathInfo()
- Specified by:
getPathInfo
in interfacejakarta.servlet.http.HttpServletRequest
-
setPathInfo
public void setPathInfo(String path)
Description copied from interface:HttpRequest
Set 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:
setPathInfo
in interfaceHttpRequest
- Parameters:
path
- The path information
-
getRequestPathMB
public org.glassfish.grizzly.http.util.DataChunk getRequestPathMB()
Description copied from interface:HttpRequest
Get the request path.- Specified by:
getRequestPathMB
in interfaceHttpRequest
- Returns:
- the request path
-
getServletPath
public String getServletPath()
- Specified by:
getServletPath
in interfacejakarta.servlet.http.HttpServletRequest
-
setServletPath
public void setServletPath(String path)
Description copied from interface:HttpRequest
Set 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:
setServletPath
in interfaceHttpRequest
- Parameters:
path
- The servlet path
-
getWrapper
public Wrapper getWrapper()
Description copied from interface:Request
Return the Wrapper within which this Request is being processed.- Specified by:
getWrapper
in interfaceRequest
-
setWrapper
public void setWrapper(Wrapper wrapper)
Description copied from interface:Request
Set 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:
setWrapper
in interfaceRequest
- Parameters:
wrapper
- The newly associated Wrapper
-
setMethod
public void setMethod(String method)
Description copied from interface:HttpRequest
Set the HTTP request method used for this Request.- Specified by:
setMethod
in interfaceHttpRequest
- Parameters:
method
- The request method
-
getMethod
public String getMethod()
- Specified by:
getMethod
in interfacejakarta.servlet.http.HttpServletRequest
-
getAuthorization
public String getAuthorization()
Description copied from interface:Request
Return the authorization credentials sent with this request.- Specified by:
getAuthorization
in interfaceRequest
-
getConnector
public Connector getConnector()
Description copied from interface:Request
Return the Connector through which this Request was received.- Specified by:
getConnector
in interfaceRequest
-
setConnector
public void setConnector(Connector connector)
Description copied from interface:Request
Set the Connector through which this Request was received.- Specified by:
setConnector
in interfaceRequest
- Parameters:
connector
- The new connector
-
getContext
public Context getContext()
Description copied from interface:Request
Return the Context within which this Request is being processed.- Specified by:
getContext
in interfaceRequest
-
setContext
public void setContext(Context context)
Description copied from interface:Request
Set 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:
setContext
in interfaceRequest
- Parameters:
context
- The newly associated Context
-
getHost
public Host getHost()
Description copied from interface:Request
Return the Host within which this Request is being processed.
-
setHost
public void setHost(Host host)
Description copied from interface:Request
Set 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:Request
Return descriptive information about this Request implementation and the corresponding version number, in the format<description>/<version>
.
-
getResponse
public Response getResponse()
Description copied from interface:Request
Return the Response with which this Request is associated.- Specified by:
getResponse
in interfaceRequest
-
setResponse
public void setResponse(Response response)
Description copied from interface:Request
Set the Response with which this Request is associated.- Specified by:
setResponse
in interfaceRequest
- Parameters:
response
- The new associated response
-
getSocket
public Socket getSocket()
Description copied from interface:Request
Return 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:Request
Set the Socket (if any) through which this Request was received.
-
getStream
public InputStream getStream()
Description copied from interface:Request
Return the input stream associated with this Request.
-
setStream
public void setStream(InputStream input)
Description copied from interface:Request
Set the input stream associated with this Request.
-
addLocale
public void addLocale(Locale locale)
Description copied from interface:HttpRequest
Add 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:
addLocale
in interfaceHttpRequest
- Parameters:
locale
- The new preferred Locale
-
createInputStream
public jakarta.servlet.ServletInputStream createInputStream() throws IOException
Description copied from interface:Request
Create and return a ServletInputStream to read the content associated with this Request.- Specified by:
createInputStream
in interfaceRequest
- Throws:
IOException
- if an input/output error occurs
-
finishRequest
public void finishRequest() throws IOException
Description copied from interface:Request
Perform whatever actions are required to flush and close the input stream or reader, in a single operation.- Specified by:
finishRequest
in interfaceRequest
- Throws:
IOException
- if an input/output error occurs
-
getNote
public Object getNote(String name)
Description copied from interface:Request
Return the object bound with the specified name to the internal notes for this request, ornull
if no such binding exists.
-
getNoteNames
public Iterator<String> getNoteNames()
Description copied from interface:Request
Return an Iterator containing the String names of all notes bindings that exist for this request.- Specified by:
getNoteNames
in interfaceRequest
-
removeNote
public void removeNote(String name)
Description copied from interface:Request
Remove any object bound to the specified name in the internal notes for this request.- Specified by:
removeNote
in interfaceRequest
- Parameters:
name
- Name of the note to be removed
-
setContentType
public void setContentType(String type)
Description copied from interface:Request
Set the content type (and optionally the character encoding) associated with this Request. For example,text/html; charset=ISO-8859-4
.- Specified by:
setContentType
in interfaceRequest
- Parameters:
type
- The new content type
-
setNote
public void setNote(String name, Object value)
Description copied from interface:Request
Bind 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:Request
Set the protocol name and version associated with this Request.- Specified by:
setProtocol
in interfaceRequest
- Parameters:
protocol
- Protocol name and version
-
setRemoteAddr
public void setRemoteAddr(String remoteAddr)
Description copied from interface:Request
Set 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:
setRemoteAddr
in interfaceRequest
- Parameters:
remoteAddr
- The remote IP address
-
setRemoteHost
public void setRemoteHost(String remoteHost)
-
setServerName
public void setServerName(String name)
Description copied from interface:Request
Set the name of the server (virtual host) to process this request.- Specified by:
setServerName
in interfaceRequest
- Parameters:
name
- The server name
-
setServerPort
public void setServerPort(int port)
Description copied from interface:Request
Set the port number of the server to process this request.- Specified by:
setServerPort
in interfaceRequest
- Parameters:
port
- The server port
-
getAttribute
public Object getAttribute(String name)
- Specified by:
getAttribute
in interfacejakarta.servlet.ServletRequest
-
getAttributeNames
public Enumeration<String> getAttributeNames()
- Specified by:
getAttributeNames
in interfacejakarta.servlet.ServletRequest
-
getCharacterEncoding
public String getCharacterEncoding()
- Specified by:
getCharacterEncoding
in interfacejakarta.servlet.ServletRequest
-
getContentLength
public int getContentLength()
- Specified by:
getContentLength
in interfacejakarta.servlet.ServletRequest
-
getContentLengthLong
public long getContentLengthLong()
- Specified by:
getContentLengthLong
in interfacejakarta.servlet.ServletRequest
-
setContentLength
public void setContentLength(int length)
Description copied from interface:Request
Set the content length associated with this Request.- Specified by:
setContentLength
in interfaceRequest
- Parameters:
length
- The new content length
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfacejakarta.servlet.ServletRequest
-
getInputStream
public jakarta.servlet.ServletInputStream getInputStream() throws IOException
- Specified by:
getInputStream
in interfacejakarta.servlet.ServletRequest
- Throws:
IOException
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfacejakarta.servlet.ServletRequest
-
getLocales
public Enumeration<Locale> getLocales()
- Specified by:
getLocales
in interfacejakarta.servlet.ServletRequest
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfacejakarta.servlet.ServletRequest
-
getReader
public BufferedReader getReader() throws IOException
- Specified by:
getReader
in interfacejakarta.servlet.ServletRequest
- Throws:
IOException
-
getRealPath
public String getRealPath(String path)
- Specified by:
getRealPath
in interfacejakarta.servlet.ServletRequest
-
getRemoteAddr
public String getRemoteAddr()
- Specified by:
getRemoteAddr
in interfacejakarta.servlet.ServletRequest
-
getRemoteHost
public String getRemoteHost()
- Specified by:
getRemoteHost
in interfacejakarta.servlet.ServletRequest
-
getScheme
public String getScheme()
- Specified by:
getScheme
in interfacejakarta.servlet.ServletRequest
-
getServerName
public String getServerName()
- Specified by:
getServerName
in interfacejakarta.servlet.ServletRequest
-
getServerPort
public int getServerPort()
- Specified by:
getServerPort
in interfacejakarta.servlet.ServletRequest
-
isSecure
public boolean isSecure()
- Specified by:
isSecure
in interfacejakarta.servlet.ServletRequest
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfacejakarta.servlet.ServletRequest
-
setAttribute
public void setAttribute(String name, Object value)
- Specified by:
setAttribute
in interfacejakarta.servlet.ServletRequest
-
setCharacterEncoding
public void setCharacterEncoding(String enc) throws UnsupportedEncodingException
- Specified by:
setCharacterEncoding
in interfacejakarta.servlet.ServletRequest
- Throws:
UnsupportedEncodingException
-
addCookie
public void addCookie(jakarta.servlet.http.Cookie cookie)
Description copied from interface:HttpRequest
Add a Cookie to the set of Cookies associated with this Request.- Specified by:
addCookie
in interfaceHttpRequest
- Parameters:
cookie
- The new cookie
-
addHeader
public void addHeader(String name, String value)
Description copied from interface:HttpRequest
Add a Header to the set of Headers associated with this Request.- Specified by:
addHeader
in interfaceHttpRequest
- Parameters:
name
- The new header namevalue
- The new header value
-
addParameter
public void addParameter(String name, String[] values)
Description copied from interface:HttpRequest
Add 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:
addParameter
in interfaceHttpRequest
- Parameters:
name
- Name of this request parametervalues
- Corresponding values for this request parameter
-
clearCookies
public void clearCookies()
Description copied from interface:HttpRequest
Clear the collection of Cookies associated with this Request.- Specified by:
clearCookies
in interfaceHttpRequest
-
clearHeaders
public void clearHeaders()
Description copied from interface:HttpRequest
Clear the collection of Headers associated with this Request.- Specified by:
clearHeaders
in interfaceHttpRequest
-
clearLocales
public void clearLocales()
Description copied from interface:HttpRequest
Clear the collection of Locales associated with this Request.- Specified by:
clearLocales
in interfaceHttpRequest
-
clearParameters
public void clearParameters()
Description copied from interface:HttpRequest
Clear the collection of parameters associated with this Request.- Specified by:
clearParameters
in interfaceHttpRequest
-
replayPayload
public void replayPayload(byte[] payloadByteArray)
- Specified by:
replayPayload
in interfaceHttpRequest
-
recycle
public void recycle()
Description copied from interface:Request
Release all object references, and initialize instance variables, in preparation for reuse of this object.
-
setAuthType
public void setAuthType(String authType)
Description copied from interface:HttpRequest
Set the authentication type used for this request, if any; otherwise set the type tonull
. Typical values are "BASIC", "DIGEST", or "SSL".- Specified by:
setAuthType
in interfaceHttpRequest
- Parameters:
authType
- The authentication type used
-
setRequestedSessionCookie
public void setRequestedSessionCookie(boolean flag)
Description copied from interface:HttpRequest
Set 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:
setRequestedSessionCookie
in interfaceHttpRequest
- Parameters:
flag
- The new flag
-
setRequestedSessionId
public void setRequestedSessionId(String id)
Description copied from interface:HttpRequest
Set the requested session ID for this request. This is normally called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestedSessionId
in interfaceHttpRequest
- Parameters:
id
- The new session id
-
setRequestedSessionURL
public void setRequestedSessionURL(boolean flag)
Description copied from interface:HttpRequest
Set 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:
setRequestedSessionURL
in interfaceHttpRequest
- Parameters:
flag
- The new flag
-
setRequestURI
public void setRequestURI(String uri)
Description copied from interface:HttpRequest
Set the unparsed request URI for this Request. This will normally be called by the HTTP Connector, when it parses the request headers.- Specified by:
setRequestURI
in interfaceHttpRequest
- Parameters:
uri
- The request URI
-
setSecure
public void setSecure(boolean secure)
Description copied from interface:Request
Set the value to be returned byisSecure()
for this Request.
-
setUserPrincipal
public void setUserPrincipal(Principal principal)
Description copied from interface:HttpRequest
Set 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:
setUserPrincipal
in interfaceHttpRequest
- Parameters:
principal
- The user Principal
-
getParameter
public String getParameter(String name)
- Specified by:
getParameter
in interfacejakarta.servlet.ServletRequest
-
getParameterMap
public Map<String,String[]> getParameterMap()
- Specified by:
getParameterMap
in interfacejakarta.servlet.ServletRequest
-
getParameterNames
public Enumeration<String> getParameterNames()
- Specified by:
getParameterNames
in interfacejakarta.servlet.ServletRequest
-
getParameterValues
public String[] getParameterValues(String name)
- Specified by:
getParameterValues
in interfacejakarta.servlet.ServletRequest
-
getRequestDispatcher
public jakarta.servlet.RequestDispatcher getRequestDispatcher(String path)
- Specified by:
getRequestDispatcher
in interfacejakarta.servlet.ServletRequest
-
getAuthType
public String getAuthType()
- Specified by:
getAuthType
in interfacejakarta.servlet.http.HttpServletRequest
-
getCookies
public jakarta.servlet.http.Cookie[] getCookies()
- Specified by:
getCookies
in interfacejakarta.servlet.http.HttpServletRequest
-
getDateHeader
public long getDateHeader(String name)
- Specified by:
getDateHeader
in interfacejakarta.servlet.http.HttpServletRequest
-
getHeader
public String getHeader(String name)
- Specified by:
getHeader
in interfacejakarta.servlet.http.HttpServletRequest
-
getHeaders
public Enumeration<String> getHeaders(String name)
- Specified by:
getHeaders
in interfacejakarta.servlet.http.HttpServletRequest
-
getHeaderNames
public Enumeration<String> getHeaderNames()
- Specified by:
getHeaderNames
in interfacejakarta.servlet.http.HttpServletRequest
-
getIntHeader
public int getIntHeader(String name)
- Specified by:
getIntHeader
in interfacejakarta.servlet.http.HttpServletRequest
-
getPathTranslated
public String getPathTranslated()
- Specified by:
getPathTranslated
in interfacejakarta.servlet.http.HttpServletRequest
-
getRemoteUser
public String getRemoteUser()
- Specified by:
getRemoteUser
in interfacejakarta.servlet.http.HttpServletRequest
-
getRequestedSessionId
public String getRequestedSessionId()
- Specified by:
getRequestedSessionId
in interfacejakarta.servlet.http.HttpServletRequest
-
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURI
in interfacejakarta.servlet.http.HttpServletRequest
-
getRequestURL
public StringBuffer getRequestURL()
- Specified by:
getRequestURL
in interfacejakarta.servlet.http.HttpServletRequest
-
getSession
public jakarta.servlet.http.HttpSession getSession()
- Specified by:
getSession
in interfacejakarta.servlet.http.HttpServletRequest
-
getSession
public jakarta.servlet.http.HttpSession getSession(boolean create)
- Specified by:
getSession
in interfacejakarta.servlet.http.HttpServletRequest
-
getSessionInternal
public Session getSessionInternal(boolean create)
Description copied from interface:Request
Gets the session associated with this Request, creating one if necessary and requested.- Specified by:
getSessionInternal
in 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:Request
Change 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:
changeSessionId
in interfacejakarta.servlet.http.HttpServletRequest
- Specified by:
changeSessionId
in interfaceRequest
-
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
- Specified by:
isRequestedSessionIdFromCookie
in interfacejakarta.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
- Specified by:
isRequestedSessionIdFromURL
in interfacejakarta.servlet.http.HttpServletRequest
-
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
- Specified by:
isRequestedSessionIdFromUrl
in interfacejakarta.servlet.http.HttpServletRequest
-
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
- Specified by:
isRequestedSessionIdValid
in interfacejakarta.servlet.http.HttpServletRequest
-
setRequestedSessionCookiePath
public void setRequestedSessionCookiePath(String cookiePath)
Description copied from interface:Request
Sets the requested session cookie path, see IT 7426- Specified by:
setRequestedSessionCookiePath
in interfaceRequest
-
isUserInRole
public boolean isUserInRole(String role)
- Specified by:
isUserInRole
in interfacejakarta.servlet.http.HttpServletRequest
-
getUserPrincipal
public Principal getUserPrincipal()
- Specified by:
getUserPrincipal
in interfacejakarta.servlet.http.HttpServletRequest
-
getLocalAddr
public String getLocalAddr()
- Specified by:
getLocalAddr
in interfacejakarta.servlet.ServletRequest
-
getLocalName
public String getLocalName()
- Specified by:
getLocalName
in interfacejakarta.servlet.ServletRequest
-
getLocalPort
public int getLocalPort()
- Specified by:
getLocalPort
in interfacejakarta.servlet.ServletRequest
-
getRemotePort
public int getRemotePort()
- Specified by:
getRemotePort
in interfacejakarta.servlet.ServletRequest
-
getDispatcherType
public jakarta.servlet.DispatcherType getDispatcherType()
- Specified by:
getDispatcherType
in interfacejakarta.servlet.ServletRequest
-
startAsync
public jakarta.servlet.AsyncContext startAsync() throws IllegalStateException
- Specified by:
startAsync
in interfacejakarta.servlet.ServletRequest
- Throws:
IllegalStateException
-
startAsync
public jakarta.servlet.AsyncContext startAsync(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse) throws IllegalStateException
- Specified by:
startAsync
in interfacejakarta.servlet.ServletRequest
- Throws:
IllegalStateException
-
isAsyncStarted
public boolean isAsyncStarted()
- Specified by:
isAsyncStarted
in interfacejakarta.servlet.ServletRequest
-
isAsyncSupported
public boolean isAsyncSupported()
- Specified by:
isAsyncSupported
in interfacejakarta.servlet.ServletRequest
-
setAsyncTimeout
public void setAsyncTimeout(long timeout)
-
getAsyncTimeout
public long getAsyncTimeout()
-
getAsyncContext
public jakarta.servlet.AsyncContext getAsyncContext()
- Specified by:
getAsyncContext
in 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:Request
Disables async support on this request.- Specified by:
disableAsyncSupport
in interfaceRequest
-
getParts
public Collection<jakarta.servlet.http.Part> getParts()
- Specified by:
getParts
in interfacejakarta.servlet.http.HttpServletRequest
-
getPart
public jakarta.servlet.http.Part getPart(String name)
- Specified by:
getPart
in interfacejakarta.servlet.http.HttpServletRequest
-
authenticate
public boolean authenticate(jakarta.servlet.http.HttpServletResponse response) throws IOException, jakarta.servlet.ServletException
- Specified by:
authenticate
in interfacejakarta.servlet.http.HttpServletRequest
- Throws:
IOException
jakarta.servlet.ServletException
-
login
public void login(String username, String password) throws jakarta.servlet.ServletException
- Specified by:
login
in interfacejakarta.servlet.http.HttpServletRequest
- Throws:
jakarta.servlet.ServletException
-
logout
public void logout() throws jakarta.servlet.ServletException
- Specified by:
logout
in interfacejakarta.servlet.http.HttpServletRequest
- Throws:
jakarta.servlet.ServletException
-
upgrade
public <T extends jakarta.servlet.http.HttpUpgradeHandler> T upgrade(Class<T> handlerClass)
- Specified by:
upgrade
in 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:
setCheckRestrictedResources
in 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:
getCheckRestrictedResources
in interfaceRequest
-
getJrouteId
public String getJrouteId()
Gets the jroute id of this request, which may have been sent as a separateJROUTE
cookie or appended to the session identifier encoded in the URI (if cookies have been disabled).- Specified by:
getJrouteId
in 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:
generateSessionId
in interfaceRequest
- Returns:
null
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()
Gets the servlet context to which this servlet request was last dispatched.- Specified by:
getServletContext
in interfacejakarta.servlet.ServletRequest
- Returns:
- the servlet context to which this servlet request was last dispatched
-
lockSession
public Session lockSession()
- Specified by:
lockSession
in interfaceRequest
-
unlockSession
public void unlockSession()
- Specified by:
unlockSession
in interfaceRequest
-
-