All Implemented Interfaces:
ServletRequest
All Known Implementing Classes:
HttpServletRequestWrapper
The servlet container creates an HttpServletRequest
object and passes it as an argument to the servlet's service
methods (doGet
, doPost
, etc).
Various
- $
- Version$Field Summary | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final String | BASIC_AUTH | String identifier for Basic authentication. Value "BASIC" | |||||||||
public static final String | FORM_AUTH | String identifier for Form authentication. Value "FORM" | |||||||||
public static final String | CLIENT_CERT_AUTH | String identifier for Client Certificate authentication. Value "CLIENT_CERT" | |||||||||
public static final String | DIGEST_AUTH | String identifier for Digest authentication. Value "DIGEST" |
Method from javax.servlet.http.HttpServletRequest Summary: |
---|
getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getIntHeader, getMethod, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestURI, getRequestURL, getRequestedSessionId, getServletPath, getSession, getSession, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromURL, isRequestedSessionIdFromUrl, isRequestedSessionIdValid, isUserInRole |
Method from javax.servlet.http.HttpServletRequest Detail: | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
null is returned.
Same as the value of the CGI variable AUTH_TYPE. | |||||||||||
| |||||||||||
Cookie
objects the client sent with this request.
This method returns null if no cookies were sent. | |||||||||||
long value that represents a
Date object. Use this method with
headers that contain dates, such as
If-Modified-Since .
The date is returned as the number of milliseconds since January 1, 1970 GMT. The header name is case insensitive. If the request did not have a header of the
specified name, this method returns -1. If the header
can't be converted to a date, the method throws
an | |||||||||||
String . If the request did not include a header
of the specified name, this method returns null .
If there are multiple headers with the same name, this method
returns the first head in the request.
The header name is case insensitive. You can use
this method with any request header. | |||||||||||
Some servlet containers do not allow
servlets to access headers using this method, in
which case this method returns | |||||||||||
Enumeration of String objects.
Some headers, such as If the request did not include any headers
of the specified name, this method returns an empty
| |||||||||||
int . If the request does not have a header
of the specified name, this method returns -1. If the
header cannot be converted to an integer, this method
throws a NumberFormatException .
The header name is case insensitive. | |||||||||||
| |||||||||||
This method returns Same as the value of the CGI variable PATH_INFO. | |||||||||||
If the URL does not have any extra path information,
this method returns | |||||||||||
null
if the URL does not have a query string. Same as the value
of the CGI variable QUERY_STRING. | |||||||||||
null if the user
has not been authenticated.
Whether the user name is sent with each subsequent request
depends on the browser and type of authentication. Same as the
value of the CGI variable REMOTE_USER. | |||||||||||
To reconstruct an URL with a scheme and host, use HttpUtils#getRequestURL . | |||||||||||
Because this method returns a This method is useful for creating redirect messages and for reporting errors. | |||||||||||
null . | |||||||||||
This method will return an empty string ("") if the servlet used to process this request was matched using the "/*" pattern. | |||||||||||
| |||||||||||
HttpSession
associated with this request or, if there is no
current session and create is true, returns
a new session.
If To make sure the session is properly maintained, you must call this method before the response is committed. If the container is using cookies to maintain session integrity and is asked to create a new session when the response is committed, an IllegalStateException is thrown. | |||||||||||
java.security.Principal object containing
the name of the current authenticated user. If the user has not been
authenticated, the method returns null . | |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
| |||||||||||
false . |