HttpServletRequest object.
This provides the bridge from Servlet HttpServletRequest to the Jetty Core Request
via the ServletContextRequest.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| private static class | ServletApiRequest.
Extended list of HttpCookies that converts and caches a servlet Cookie array. |
| Modifier and Type | Field and Description |
|---|---|
| private AsyncContextState | |
| private boolean | |
| private Charset | |
| private Fields | |
| private boolean | |
| private String | |
| private int | |
| private Fields | |
| private ServletMultiPartFormData. | |
| private Fields | |
| private BufferedReader | |
| private Charset | |
| private final ServletChannel | |
| private final ServletContextRequest | |
| private static final Logger | |
| private static final SetCookieParser |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | authenticate(HttpServletResponse
The response)HttpServletResponse associated with this HttpServletRequestImplements jakarta. Use the container login mechanism configured for the |
| public String | changeSessionId()
Implements jakarta. Change the session id of the current session associated with this request and return the new session id. |
| private void | |
| private void | |
| private String | |
| private int | |
| private String | |
| public AsyncContext | getAsyncContext()
Implements jakarta. Gets the AsyncContext that was created or reinitialized by the most recent invocation of |
| public Object | getAttribute(String
a name)String specifying the name of the attributeImplements jakarta. Returns the value of the named attribute as an |
| public Enumeration | getAttributeNames()
Implements jakarta. Returns an |
| public AuthenticationState | |
| public String | getAuthType()
Implements jakarta. Returns the name of the authentication scheme used to protect the servlet. |
| public String | getCharacterEncoding()
Implements jakarta. Returns the name of the character encoding used in the body of this request. |
| public int | getContentLength()
Implements jakarta. Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known or is greater than Integer.MAX_VALUE. |
| public long | getContentLengthLong()
Implements jakarta. Returns the length, in bytes, of the request body and made available by the input stream, or -1 if the length is not known. |
| public String | getContentType()
Implements jakarta. Returns the MIME type of the body of the request, or |
| public String | getContextPath()
Implements jakarta. Returns the portion of the request URI that indicates the context of the request. |
| public Cookie[] | getCookies()
Implements jakarta. Returns an array containing all of the |
| public long | getDateHeader(String
a name)String specifying the name of the headerImplements jakarta. Returns the value of the specified request header as a |
| public DispatcherType | getDispatcherType()
Implements jakarta. Gets the dispatcher type of this request. |
| public HttpFields | |
| public String | getHeader(String
a name)String specifying the header nameImplements jakarta. Returns the value of the specified request header as a |
| public Enumeration | getHeaderNames()
Implements jakarta. Returns an enumeration of all the header names this request contains. |
| public Enumeration | getHeaders(String
a name)String specifying the header nameImplements jakarta. Returns all the values of the specified request header as an |
| public HttpServletMapping | getHttpServletMapping()
Overrides default jakarta. Return the HttpServletMapping of the request. |
| public ServletInputStream | getInputStream()
Implements jakarta. Retrieves the body of the request as binary data using a |
| public int | getIntHeader(String
a name)String specifying the name of a request headerImplements jakarta. Returns the value of the specified request header as an |
| public String | getLocalAddr()
Implements jakarta. Returns the Internet Protocol (IP) address representing the interface on which the request was received. |
| public Locale | getLocale()
Implements jakarta. Returns the preferred |
| public Enumeration | getLocales()
Implements jakarta. Returns an |
| public String | getLocalName()
Implements jakarta. Returns the fully qualified name of the address returned by |
| public int | getLocalPort()
Implements jakarta. Returns the Internet Protocol (IP) port number representing the interface on which the request was received. |
| public String | getMethod()
Implements jakarta. Returns the name of the HTTP method with which this request was made, for example, GET, POST, or PUT. |
| public String | getParameter(String
a name)String specifying the name of the parameterImplements jakarta. Returns the value of a request parameter as a |
| public Map | getParameterMap()
Implements jakarta. Returns a java.util.Map of the parameters of this request. |
| public Enumeration | getParameterNames()
Implements jakarta. Returns an |
| private Fields | |
| public String[] | getParameterValues(String
a name)String containing the name of the parameter whose value is requestedImplements jakarta. Returns an array of |
| public Part | getPart(String
the name of the requested name)PartImplements jakarta. Gets the |
| public Collection | getParts()
Implements jakarta. Gets all the |
| public String | getPathInfo()
Implements jakarta. Returns any extra path information associated with the URL the client sent when it made this request. |
| public String | getPathTranslated()
Implements jakarta. Returns any extra path information after the servlet name but before the query string, and translates it to a real path. |
| public String | getProtocol()
Implements jakarta. Returns the name and version of the protocol the request uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
| public String | getProtocolRequestId()
Implements jakarta. Obtain the request identifier for this request as defined by the protocol in use. |
| public String | getQueryString()
Implements jakarta. Returns the query string that is contained in the request URL after the path. |
| public BufferedReader | getReader()
Implements jakarta. Retrieves the body of the request as character data using a |
| public String | getRemoteAddr()
Implements jakarta. Returns the Internet Protocol (IP) of the remote end of the connection on which the request was received. |
| public String | getRemoteHost()
Implements jakarta. Returns the fully qualified name of the address returned by |
| public int | getRemotePort()
Implements jakarta. Returns the Internet Protocol (IP) source port the remote end of the connection on which the request was received. |
| public String | getRemoteUser()
Implements jakarta. Returns the login of the user making this request, if the user has been authenticated, or |
| public Request | |
| public RequestDispatcher | getRequestDispatcher(String
a path)String specifying the pathname to the resource. If it is relative, it must be relative
against the current servlet.Implements jakarta. Returns a |
| public String | getRequestedSessionId()
Implements jakarta. Returns the session ID specified by the client. |
| public String | getRequestId()
Implements jakarta. Obtain a unique (within the lifetime of the Servlet container) identifier string for this request. |
| public String | getRequestURI()
Implements jakarta. Returns the part of this request's URL from the protocol name up to the query string in the first line of the HTTP request. |
| public StringBuffer | getRequestURL()
Implements jakarta. Reconstructs the URL the client used to make the request. |
| public String | getScheme()
Implements jakarta. Returns the name of the scheme used to make this request, for example, |
| public String | getServerName()
Implements jakarta. Returns the host name of the server to which the request was sent. |
| public int | getServerPort()
Implements jakarta. Returns the port number to which the request was sent. |
| public ServletConnection | getServletConnection()
Implements jakarta. Obtain details of the network connection to the Servlet container that is being used by this request. |
| public ServletContext | getServletContext()
Implements jakarta. Gets the servlet context to which this ServletRequest was last dispatched. |
| public String | getServletPath()
Implements jakarta. Returns the part of this request's URL that calls the servlet. |
| public ServletContextHandler. | getServletRequestInfo()
Returns: The |
| public HttpSession | getSession(boolean
true to create a new session for this request if necessary; false to return
null if there's no current sessionImplements jakarta. Returns the current |
| public HttpSession | getSession()
Implements jakarta. Returns the current session associated with this request, or if the request does not have a session, creates one. |
| public Map | getTrailerFields()
Overrides default jakarta. Get the request trailer fields. |
| private AuthenticationState | |
| public Principal | getUserPrincipal()
Implements jakarta. Returns a |
| public boolean | isAsyncStarted()
Implements jakarta. Checks if this request has been put into asynchronous mode. |
| public boolean | isAsyncSupported()
Implements jakarta. Checks if this request supports asynchronous operation. |
| public boolean | isRequestedSessionIdFromCookie()
Implements jakarta. Checks whether the requested session ID was conveyed to the server as an HTTP cookie. |
| public boolean | isRequestedSessionIdFromURL()
Implements jakarta. Checks whether the requested session ID was conveyed to the server as part of the request URL. |
| public boolean | isRequestedSessionIdValid()
Implements jakarta. Checks whether the requested session ID is still valid. |
| public boolean | isSecure()
Implements jakarta. Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS. |
| public boolean | isUserInRole(String
a role)String specifying the name of the roleImplements jakarta. Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
| public void | login(String
The username, String String value corresponding to the login identifier of the user.The password password)String corresponding to the identified user.Implements jakarta. Validate the provided username and password in the password validation realm used by the web container login
mechanism configured for the |
| public void | logout()
Implements jakarta. Establish |
| public PushBuilder | newPushBuilder()
Overrides default jakarta. Instantiates a new instance of |
| public void | removeAttribute(String
a name)String specifying the name of the attribute to removeImplements jakarta. Removes an attribute from this request. |
| public void | |
| public void | setAttribute(String
a name, Object String specifying the name of the attributethe attribute)Object to be storedImplements jakarta. Stores an attribute in this request. |
| public void | setCharacterEncoding(String
String containing the name of the character encoding.Implements jakarta. Overrides the name of the character encoding used in the body of this request. |
| public AsyncContext | startAsync()
Implements jakarta. Puts this request into asynchronous mode, and initializes its |
| public AsyncContext | startAsync(ServletRequest
the ServletRequest used to initialize the AsyncContext servletRequest, ServletResponse the ServletResponse used to initialize the AsyncContext servletResponse)Implements jakarta. Puts this request into asynchronous mode, and initializes its |
| public <T extends HttpUpgradeHandler> T | upgrade(Class<T>
The handlerClass)HttpUpgradeHandler class used for the upgrade.Implements jakarta. Creates an instance of |