Top Description Fields Constructors Methods
jakarta.servlet

public Class ServletRequestWrapper

extends Object
implements ServletRequest
Class Inheritance
All Implemented Interfaces
jakarta.servlet.ServletRequest
Known Direct Subclasses
jakarta.servlet.http.HttpServletRequestWrapper, org.apache.catalina.core.ApplicationRequest
Imports
java.io.BufferedReader, .IOException, java.util.Enumeration, .Locale, .Map, .ResourceBundle

Provides a convenient implementation of the ServletRequest interface that can be subclassed by developers wishing to adapt the request to a Servlet. This class implements the Wrapper or Decorator pattern. Methods default to calling through to the wrapped request object.
Since
Servlet 2.3
See Also
jakarta.servlet.ServletRequest

Field Summary

Modifier and TypeField and Description
private static final String
private static final ResourceBundle
private ServletRequest

Constructor Summary

AccessConstructor and Description
public
ServletRequestWrapper(ServletRequest
The request to wrap
request
)

Creates a ServletRequest adaptor wrapping the given request object.

Method Summary

Modifier and TypeMethod and Description
public AsyncContext
getAsyncContext()

Implements jakarta.servlet.ServletRequest.getAsyncContext.

The default behavior of this method is to return getAsyncContext() on the wrapped request object.

public Object
getAttribute(String
a String specifying the name of the attribute
name
)

Implements jakarta.servlet.ServletRequest.getAttribute.

The default behavior of this method is to call getAttribute(String name) on the wrapped request object.

public Enumeration<String>
getAttributeNames()

Implements jakarta.servlet.ServletRequest.getAttributeNames.

The default behavior of this method is to return getAttributeNames() on the wrapped request object.

public String
getCharacterEncoding()

Implements jakarta.servlet.ServletRequest.getCharacterEncoding.

The default behavior of this method is to return getCharacterEncoding() on the wrapped request object.

public int
getContentLength()

Implements jakarta.servlet.ServletRequest.getContentLength.

The default behavior of this method is to return getContentLength() on the wrapped request object.

public long
getContentLengthLong()

Implements jakarta.servlet.ServletRequest.getContentLengthLong.

The default behavior of this method is to return getContentLengthLong() on the wrapped request object.

public String
getContentType()

Implements jakarta.servlet.ServletRequest.getContentType.

The default behavior of this method is to return getContentType() on the wrapped request object.

public DispatcherType
getDispatcherType()

Implements jakarta.servlet.ServletRequest.getDispatcherType.

The default behavior of this method is to call getDispatcherType() on the wrapped request object.

public ServletInputStream
getInputStream()

Implements jakarta.servlet.ServletRequest.getInputStream.

The default behavior of this method is to return getInputStream() on the wrapped request object.

public String
getLocalAddr()

Implements jakarta.servlet.ServletRequest.getLocalAddr.

The default behavior of this method is to return getLocalAddr() on the wrapped request object.

public Locale
getLocale()

Implements jakarta.servlet.ServletRequest.getLocale.

The default behavior of this method is to return getLocale() on the wrapped request object.

public Enumeration<Locale>
getLocales()

Implements jakarta.servlet.ServletRequest.getLocales.

The default behavior of this method is to return getLocales() on the wrapped request object.

public String
getLocalName()

Implements jakarta.servlet.ServletRequest.getLocalName.

The default behavior of this method is to return getLocalName() on the wrapped request object.

public int
getLocalPort()

Implements jakarta.servlet.ServletRequest.getLocalPort.

The default behavior of this method is to return getLocalPort() on the wrapped request object.

public String
getParameter(String
a String specifying the name of the parameter
name
)

Implements jakarta.servlet.ServletRequest.getParameter.

The default behavior of this method is to return getParameter(String name) on the wrapped request object.

public Map<String, String[]>
getParameterMap()

Implements jakarta.servlet.ServletRequest.getParameterMap.

The default behavior of this method is to return getParameterMap() on the wrapped request object.

public Enumeration<String>
getParameterNames()

Implements jakarta.servlet.ServletRequest.getParameterNames.

The default behavior of this method is to return getParameterNames() on the wrapped request object.

public String[]
getParameterValues(String
a String containing the name of the parameter whose value is requested
name
)

Implements jakarta.servlet.ServletRequest.getParameterValues.

The default behavior of this method is to return getParameterValues(String name) on the wrapped request object.

public String
getProtocol()

Implements jakarta.servlet.ServletRequest.getProtocol.

The default behavior of this method is to return getProtocol() on the wrapped request object.

public String

Returns:

the protocol defined request ID, if any, for the wrapped request
getProtocolRequestId
()

Implements jakarta.servlet.ServletRequest.getProtocolRequestId.

Gets the protocol defined request ID, if any, for the wrapped request.

public BufferedReader
getReader()

Implements jakarta.servlet.ServletRequest.getReader.

The default behavior of this method is to return getReader() on the wrapped request object.

public String
getRemoteAddr()

Implements jakarta.servlet.ServletRequest.getRemoteAddr.

The default behavior of this method is to return getRemoteAddr() on the wrapped request object.

public String
getRemoteHost()

Implements jakarta.servlet.ServletRequest.getRemoteHost.

The default behavior of this method is to return getRemoteHost() on the wrapped request object.

public int
getRemotePort()

Implements jakarta.servlet.ServletRequest.getRemotePort.

The default behavior of this method is to return getRemotePort() on the wrapped request object.

public ServletRequest

Returns:

the wrapped request object
getRequest
()

Get the wrapped request.

public RequestDispatcher
getRequestDispatcher(String
a String specifying the pathname to the resource. If it is relative, it must be relative against the current servlet.
path
)

Implements jakarta.servlet.ServletRequest.getRequestDispatcher.

The default behavior of this method is to return getRequestDispatcher(String path) on the wrapped request object.

public String

Returns:

the request ID for the wrapped request
getRequestId
()

Implements jakarta.servlet.ServletRequest.getRequestId.

Gets the request ID for the wrapped request.

public String
getScheme()

Implements jakarta.servlet.ServletRequest.getScheme.

The default behavior of this method is to return getScheme() on the wrapped request object.

public String
getServerName()

Implements jakarta.servlet.ServletRequest.getServerName.

The default behavior of this method is to return getServerName() on the wrapped request object.

public int
getServerPort()

Implements jakarta.servlet.ServletRequest.getServerPort.

The default behavior of this method is to return getServerPort() on the wrapped request object.

public ServletConnection

Returns:

the connection information for the wrapped request
getServletConnection
()

Implements jakarta.servlet.ServletRequest.getServletConnection.

Gets the connection information for the wrapped request.

public ServletContext
getServletContext()

Implements jakarta.servlet.ServletRequest.getServletContext.

The default behavior of this method is to return getServletContext() on the wrapped request object.

public boolean
isAsyncStarted()

Implements jakarta.servlet.ServletRequest.isAsyncStarted.

The default behavior of this method is to return isAsyncStarted() on the wrapped request object.

public boolean
isAsyncSupported()

Implements jakarta.servlet.ServletRequest.isAsyncSupported.

The default behavior of this method is to return isAsyncSupported() on the wrapped request object.

public boolean
isSecure()

Implements jakarta.servlet.ServletRequest.isSecure.

The default behavior of this method is to return isSecure() on the wrapped request object.

public boolean

Returns:

true if the request wrapped by this wrapper (or series of wrappers) is the same as the supplied request, otherwise false
isWrapperFor
(ServletRequest
The request to compare to the wrapped request
wrapped
)

TODO SERVLET3 - Add comments

public boolean

Returns:

true if the request wrapped by this wrapper (or series of wrappers) is the same type as the supplied type, otherwise false
isWrapperFor
(Class<?>
The class to compare to the class of the wrapped request
wrappedType
)

TODO SERVLET3 - Add comments

public void
removeAttribute(String
a String specifying the name of the attribute to remove
name
)

Implements jakarta.servlet.ServletRequest.removeAttribute.

The default behavior of this method is to call removeAttribute(String name) on the wrapped request object.

public void
setAttribute(String
a String specifying the name of the attribute
name
,
Object
the Object to be stored
o
)

Implements jakarta.servlet.ServletRequest.setAttribute.

The default behavior of this method is to return setAttribute(String name, Object o) on the wrapped request object.

public void
setCharacterEncoding(String
a String containing the name of the character encoding
enc
)

Implements jakarta.servlet.ServletRequest.setCharacterEncoding.

The default behavior of this method is to set the character encoding on the wrapped request object.

public void
setRequest(ServletRequest
The new wrapped request.
request
)

Sets the request object being wrapped.

public AsyncContext
startAsync()

Implements jakarta.servlet.ServletRequest.startAsync.

The default behavior of this method is to return startAsync() on the wrapped request object.

public AsyncContext
startAsync(ServletRequest
The ServletRequest with which to initialise the asynchronous context
servletRequest
,
ServletResponse
The ServletResponse with which to initialise the asynchronous context
servletResponse
)

Implements jakarta.servlet.ServletRequest.startAsync.

The default behavior of this method is to return startAsync(Runnable) on the wrapped request object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LSTRING_FILEback to summary
private static final String LSTRING_FILE
lStringsback to summary
private static final ResourceBundle lStrings
requestback to summary
private ServletRequest request

Constructor Detail

ServletRequestWrapperback to summary
public ServletRequestWrapper(ServletRequest request)

Creates a ServletRequest adaptor wrapping the given request object.

Parameters
request:ServletRequest

The request to wrap

Exceptions
IllegalArgumentException:
if the request is null

Method Detail

getAsyncContextback to summary
public AsyncContext getAsyncContext()

Implements jakarta.servlet.ServletRequest.getAsyncContext.

The default behavior of this method is to return getAsyncContext() on the wrapped request object.

Returns:AsyncContext

Doc from jakarta.servlet.ServletRequest.getAsyncContext.

The current AsyncContext

Annotations
@Override
Since
Servlet 3.0
getAttributeback to summary
public Object getAttribute(String name)

Implements jakarta.servlet.ServletRequest.getAttribute.

The default behavior of this method is to call getAttribute(String name) on the wrapped request object.

Parameters
name:String

Doc from jakarta.servlet.ServletRequest.getAttribute.

a String specifying the name of the attribute

Returns:Object

Doc from jakarta.servlet.ServletRequest.getAttribute.

an Object containing the value of the attribute, or null if the attribute does not exist

Annotations
@Override
getAttributeNamesback to summary
public Enumeration<String> getAttributeNames()

Implements jakarta.servlet.ServletRequest.getAttributeNames.

The default behavior of this method is to return getAttributeNames() on the wrapped request object.

Returns:Enumeration<String>

Doc from jakarta.servlet.ServletRequest.getAttributeNames.

an Enumeration of strings containing the names of the request's attributes

Annotations
@Override
getCharacterEncodingback to summary
public String getCharacterEncoding()

Implements jakarta.servlet.ServletRequest.getCharacterEncoding.

The default behavior of this method is to return getCharacterEncoding() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getCharacterEncoding.

a String containing the name of the character encoding, or null if the request does not specify a character encoding

Annotations
@Override
getContentLengthback to summary
public int getContentLength()

Implements jakarta.servlet.ServletRequest.getContentLength.

The default behavior of this method is to return getContentLength() on the wrapped request object.

Returns:int

Doc from jakarta.servlet.ServletRequest.getContentLength.

an integer containing the length of the request body or -1 if the length is not known or is greater than Integer#MAX_VALUE

Annotations
@Override
getContentLengthLongback to summary
public long getContentLengthLong()

Implements jakarta.servlet.ServletRequest.getContentLengthLong.

The default behavior of this method is to return getContentLengthLong() on the wrapped request object.

Returns:long

Doc from jakarta.servlet.ServletRequest.getContentLengthLong.

a long integer containing the length of the request body or -1 if the length is not known

Annotations
@Override
Since
Servlet 3.1
getContentTypeback to summary
public String getContentType()

Implements jakarta.servlet.ServletRequest.getContentType.

The default behavior of this method is to return getContentType() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getContentType.

a String containing the name of the MIME type of the request, or null if the type is not known

Annotations
@Override
getDispatcherTypeback to summary
public DispatcherType getDispatcherType()

Implements jakarta.servlet.ServletRequest.getDispatcherType.

The default behavior of this method is to call getDispatcherType() on the wrapped request object.

Returns:DispatcherType

Doc from jakarta.servlet.ServletRequest.getDispatcherType.

TODO

Annotations
@Override
Since
Servlet 3.0
getInputStreamback to summary
public ServletInputStream getInputStream() throws IOException

Implements jakarta.servlet.ServletRequest.getInputStream.

The default behavior of this method is to return getInputStream() on the wrapped request object.

Returns:ServletInputStream

Doc from jakarta.servlet.ServletRequest.getInputStream.

a ServletInputStream object containing the body of the request

Annotations
@Override
Exceptions
IOException:

Doc from jakarta.servlet.ServletRequest.getInputStream.

if an input or output exception occurred

getLocalAddrback to summary
public String getLocalAddr()

Implements jakarta.servlet.ServletRequest.getLocalAddr.

The default behavior of this method is to return getLocalAddr() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getLocalAddr.

a String containing the IP address on which the request was received.

Annotations
@Override
Since
Servlet 2.4
getLocaleback to summary
public Locale getLocale()

Implements jakarta.servlet.ServletRequest.getLocale.

The default behavior of this method is to return getLocale() on the wrapped request object.

Returns:Locale

Doc from jakarta.servlet.ServletRequest.getLocale.

the preferred Locale for the client

Annotations
@Override
getLocalesback to summary
public Enumeration<Locale> getLocales()

Implements jakarta.servlet.ServletRequest.getLocales.

The default behavior of this method is to return getLocales() on the wrapped request object.

Returns:Enumeration<Locale>

Doc from jakarta.servlet.ServletRequest.getLocales.

an Enumeration of preferred Locale objects for the client

Annotations
@Override
getLocalNameback to summary
public String getLocalName()

Implements jakarta.servlet.ServletRequest.getLocalName.

The default behavior of this method is to return getLocalName() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getLocalName.

a String containing the host name of the IP on which the request was received.

Annotations
@Override
Since
Servlet 2.4
getLocalPortback to summary
public int getLocalPort()

Implements jakarta.servlet.ServletRequest.getLocalPort.

The default behavior of this method is to return getLocalPort() on the wrapped request object.

Returns:int

Doc from jakarta.servlet.ServletRequest.getLocalPort.

an integer specifying the port number

Annotations
@Override
Since
Servlet 2.4
getParameterback to summary
public String getParameter(String name)

Implements jakarta.servlet.ServletRequest.getParameter.

The default behavior of this method is to return getParameter(String name) on the wrapped request object.

Parameters
name:String

Doc from jakarta.servlet.ServletRequest.getParameter.

a String specifying the name of the parameter

Returns:String

Doc from jakarta.servlet.ServletRequest.getParameter.

a String representing the single value of the parameter

Annotations
@Override
getParameterMapback to summary
public Map<String, String[]> getParameterMap()

Implements jakarta.servlet.ServletRequest.getParameterMap.

The default behavior of this method is to return getParameterMap() on the wrapped request object.

Returns:Map<String, String[]>

Doc from jakarta.servlet.ServletRequest.getParameterMap.

an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.

Annotations
@Override
getParameterNamesback to summary
public Enumeration<String> getParameterNames()

Implements jakarta.servlet.ServletRequest.getParameterNames.

The default behavior of this method is to return getParameterNames() on the wrapped request object.

Returns:Enumeration<String>

Doc from jakarta.servlet.ServletRequest.getParameterNames.

an Enumeration of String objects, each String containing the name of a request parameter; or an empty Enumeration if the request has no parameters

Annotations
@Override
getParameterValuesback to summary
public String[] getParameterValues(String name)

Implements jakarta.servlet.ServletRequest.getParameterValues.

The default behavior of this method is to return getParameterValues(String name) on the wrapped request object.

Parameters
name:String

Doc from jakarta.servlet.ServletRequest.getParameterValues.

a String containing the name of the parameter whose value is requested

Returns:String[]

Doc from jakarta.servlet.ServletRequest.getParameterValues.

an array of String objects containing the parameter's values

Annotations
@Override
getProtocolback to summary
public String getProtocol()

Implements jakarta.servlet.ServletRequest.getProtocol.

The default behavior of this method is to return getProtocol() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getProtocol.

a String containing the protocol name and version number

Annotations
@Override
getProtocolRequestIdback to summary
public String getProtocolRequestId()

Implements jakarta.servlet.ServletRequest.getProtocolRequestId.

Gets the protocol defined request ID, if any, for the wrapped request.

Returns:String

the protocol defined request ID, if any, for the wrapped request

Annotations
@Override
Since
Servlet 6.0
getReaderback to summary
public BufferedReader getReader() throws IOException

Implements jakarta.servlet.ServletRequest.getReader.

The default behavior of this method is to return getReader() on the wrapped request object.

Returns:BufferedReader

Doc from jakarta.servlet.ServletRequest.getReader.

a BufferedReader containing the body of the request

Annotations
@Override
Exceptions
IOException:

Doc from jakarta.servlet.ServletRequest.getReader.

if an input or output exception occurred

getRemoteAddrback to summary
public String getRemoteAddr()

Implements jakarta.servlet.ServletRequest.getRemoteAddr.

The default behavior of this method is to return getRemoteAddr() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getRemoteAddr.

a String containing the IP address of the client that sent the request

Annotations
@Override
getRemoteHostback to summary
public String getRemoteHost()

Implements jakarta.servlet.ServletRequest.getRemoteHost.

The default behavior of this method is to return getRemoteHost() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getRemoteHost.

a String containing the fully qualified name of the client

Annotations
@Override
getRemotePortback to summary
public int getRemotePort()

Implements jakarta.servlet.ServletRequest.getRemotePort.

The default behavior of this method is to return getRemotePort() on the wrapped request object.

Returns:int

Doc from jakarta.servlet.ServletRequest.getRemotePort.

an integer specifying the port number

Annotations
@Override
Since
Servlet 2.4
getRequestback to summary
public ServletRequest getRequest()

Get the wrapped request.

Returns:ServletRequest

the wrapped request object

getRequestDispatcherback to summary
public RequestDispatcher getRequestDispatcher(String path)

Implements jakarta.servlet.ServletRequest.getRequestDispatcher.

The default behavior of this method is to return getRequestDispatcher(String path) on the wrapped request object.

Parameters
path:String

Doc from jakarta.servlet.ServletRequest.getRequestDispatcher.

a String specifying the pathname to the resource. If it is relative, it must be relative against the current servlet.

Returns:RequestDispatcher

Doc from jakarta.servlet.ServletRequest.getRequestDispatcher.

a RequestDispatcher object that acts as a wrapper for the resource at the specified path, or null if the servlet container cannot return a RequestDispatcher

Annotations
@Override
getRequestIdback to summary
public String getRequestId()

Implements jakarta.servlet.ServletRequest.getRequestId.

Gets the request ID for the wrapped request.

Returns:String

the request ID for the wrapped request

Annotations
@Override
Since
Servlet 6.0
getSchemeback to summary
public String getScheme()

Implements jakarta.servlet.ServletRequest.getScheme.

The default behavior of this method is to return getScheme() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getScheme.

a String containing the name of the scheme used to make this request

Annotations
@Override
getServerNameback to summary
public String getServerName()

Implements jakarta.servlet.ServletRequest.getServerName.

The default behavior of this method is to return getServerName() on the wrapped request object.

Returns:String

Doc from jakarta.servlet.ServletRequest.getServerName.

a String containing the name of the server

Annotations
@Override
getServerPortback to summary
public int getServerPort()

Implements jakarta.servlet.ServletRequest.getServerPort.

The default behavior of this method is to return getServerPort() on the wrapped request object.

Returns:int

Doc from jakarta.servlet.ServletRequest.getServerPort.

an integer specifying the port number

Annotations
@Override
getServletConnectionback to summary
public ServletConnection getServletConnection()

Implements jakarta.servlet.ServletRequest.getServletConnection.

Gets the connection information for the wrapped request.

Returns:ServletConnection

the connection information for the wrapped request

Annotations
@Override
Since
Servlet 6.0
getServletContextback to summary
public ServletContext getServletContext()

Implements jakarta.servlet.ServletRequest.getServletContext.

The default behavior of this method is to return getServletContext() on the wrapped request object.

Returns:ServletContext

Doc from jakarta.servlet.ServletRequest.getServletContext.

TODO

Annotations
@Override
Since
Servlet 3.0
isAsyncStartedback to summary
public boolean isAsyncStarted()

Implements jakarta.servlet.ServletRequest.isAsyncStarted.

The default behavior of this method is to return isAsyncStarted() on the wrapped request object.

Returns:boolean

Doc from jakarta.servlet.ServletRequest.isAsyncStarted.

TODO

Annotations
@Override
Since
Servlet 3.0
isAsyncSupportedback to summary
public boolean isAsyncSupported()

Implements jakarta.servlet.ServletRequest.isAsyncSupported.

The default behavior of this method is to return isAsyncSupported() on the wrapped request object.

Returns:boolean

Doc from jakarta.servlet.ServletRequest.isAsyncSupported.

TODO

Annotations
@Override
Since
Servlet 3.0
isSecureback to summary
public boolean isSecure()

Implements jakarta.servlet.ServletRequest.isSecure.

The default behavior of this method is to return isSecure() on the wrapped request object.

Returns:boolean

Doc from jakarta.servlet.ServletRequest.isSecure.

a boolean indicating if the request was made using a secure channel

Annotations
@Override
isWrapperForback to summary
public boolean isWrapperFor(ServletRequest wrapped)

TODO SERVLET3 - Add comments

Parameters
wrapped:ServletRequest

The request to compare to the wrapped request

Returns:boolean

true if the request wrapped by this wrapper (or series of wrappers) is the same as the supplied request, otherwise false

Since
Servlet 3.0
isWrapperForback to summary
public boolean isWrapperFor(Class<?> wrappedType)

TODO SERVLET3 - Add comments

Parameters
wrappedType:Class<?>

The class to compare to the class of the wrapped request

Returns:boolean

true if the request wrapped by this wrapper (or series of wrappers) is the same type as the supplied type, otherwise false

Since
Servlet 3.0
removeAttributeback to summary
public void removeAttribute(String name)

Implements jakarta.servlet.ServletRequest.removeAttribute.

The default behavior of this method is to call removeAttribute(String name) on the wrapped request object.

Parameters
name:String

Doc from jakarta.servlet.ServletRequest.removeAttribute.

a String specifying the name of the attribute to remove

Annotations
@Override
setAttributeback to summary
public void setAttribute(String name, Object o)

Implements jakarta.servlet.ServletRequest.setAttribute.

The default behavior of this method is to return setAttribute(String name, Object o) on the wrapped request object.

Parameters
name:String

Doc from jakarta.servlet.ServletRequest.setAttribute.

a String specifying the name of the attribute

o:Object

Doc from jakarta.servlet.ServletRequest.setAttribute.

the Object to be stored

Annotations
@Override
setCharacterEncodingback to summary
public void setCharacterEncoding(String enc) throws UnsupportedEncodingException

Implements jakarta.servlet.ServletRequest.setCharacterEncoding.

The default behavior of this method is to set the character encoding on the wrapped request object.

Parameters
enc:String

Doc from jakarta.servlet.ServletRequest.setCharacterEncoding.

a String containing the name of the character encoding

Annotations
@Override
Exceptions
UnsupportedEncodingException:

Doc from jakarta.servlet.ServletRequest.setCharacterEncoding.

if this is not a valid encoding

setRequestback to summary
public void setRequest(ServletRequest request)

Sets the request object being wrapped.

Parameters
request:ServletRequest

The new wrapped request.

Exceptions
IllegalArgumentException:
if the request is null.
startAsyncback to summary
public AsyncContext startAsync() throws IllegalStateException

Implements jakarta.servlet.ServletRequest.startAsync.

The default behavior of this method is to return startAsync() on the wrapped request object.

Returns:AsyncContext

Doc from jakarta.servlet.ServletRequest.startAsync.

TODO

Annotations
@Override
Exceptions
IllegalStateException:
If asynchronous processing is not supported for this request or if the request is already in asynchronous mode
Since
Servlet 3.0
startAsyncback to summary
public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException

Implements jakarta.servlet.ServletRequest.startAsync.

The default behavior of this method is to return startAsync(Runnable) on the wrapped request object.

Parameters
servletRequest:ServletRequest

The ServletRequest with which to initialise the asynchronous context

servletResponse:ServletResponse

The ServletResponse with which to initialise the asynchronous context

Returns:AsyncContext

Doc from jakarta.servlet.ServletRequest.startAsync.

TODO

Annotations
@Override
Exceptions
IllegalStateException:
If asynchronous processing is not supported for this request or if the request is already in asynchronous mode
Since
Servlet 3.0