Implements javax.servlet.HttpServletRequest from the javax.servlet package.
The standard interface of mostly getters, is extended with setters so that the request is mutable by the handlers that it is passed to. This allows the request object to be as lightweight as possible and not actually implement any significant behaviour. For example
getContextPath method will return null, until the requeset has been
passed to a ContextHandler which matches the getPathInfo with a context
path and calls setContextPath as a result.org.mortbay.jetty.servlet.SessionHandler which checks for session cookies
and enables the ability to create new sessions.getServletPath method will return null until the request has been
passed to a org.mortbay.jetty.servlet.ServletHandler and the pathInfo matched
against the servlet URL patterns and setServletPath called as a result.HttpConnection accepted by the server
and recycled for each HTTP request received via that connection. An effort is made
to avoid reparsing headers and cookies that are likely to be the same for
requests from the same connection.
| Modifier and Type | Field and Description |
|---|---|
| private static final Collection | |
| private static final int | |
| private static final int | |
| private Attributes | |
| private String | |
| private MultiMap | |
| private String | |
| private ContextHandler. | |
| private String | |
| private Continuation | _continuation
Deprecated
as a consequence of
Continuation being deprecated.
|
| private CookieCutter | |
| private boolean | |
| private boolean | |
| private EndPoint | |
| private boolean | |
| private int | |
| private String | |
| private MultiMap | |
| private boolean | |
| private String | |
| private int | |
| private String | |
| private String | |
| private String | |
| private BufferedReader | |
| private String | |
| private String | |
| private String | |
| private Object | |
| private String | |
| private boolean | |
| private String | |
| private Map | |
| private Map | |
| private String | |
| private String | |
| private String | |
| private String | |
| private HttpSession | |
| private SessionManager | |
| private static final int | |
| private long | |
| private Buffer | |
| private HttpURI | |
| private Principal | |
| private UserRealm |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | |
| public void | |
| private void | |
| public Object | getAttribute(String
a name)String specifying the name of the attributeImplements javax. Object,
or null if no attribute of the given name exists.
|
| public Enumeration | getAttributeNames()
Implements javax. Enumeration containing the
names of the attributes available to this request.
|
| public Attributes | |
| public String | getAuthType()
Implements javax. |
| public String | getCharacterEncoding()
Implements javax. |
| public HttpConnection | |
| public int | getContentLength()
Implements javax. |
| public String | getContentType()
Implements javax. null if the type is not known.
|
| public ContextHandler. | |
| public String | getContextPath()
Implements javax. |
| public Continuation | |
| public Continuation | |
| public Cookie[] | getCookies()
Implements javax. Cookie
objects the client sent with this request.
|
| public long | getDateHeader(String
a name)String specifying the
name of the headerImplements javax. long value that represents a
Date object.
|
| public String | getHeader(String
a name)String specifying the
header nameImplements javax. String.
|
| public Enumeration | getHeaderNames()
Implements javax. |
| public Enumeration | getHeaders(String
a name)String specifying the
header nameImplements javax. Enumeration of String objects.
|
| public int | |
| public ServletInputStream | getInputStream()
Implements javax. ServletInputStream.
|
| public int | getIntHeader(String
a name)String specifying the name
of a request headerImplements javax. int.
|
| public String | getLocalAddr()
Implements javax. |
| public Locale | getLocale()
Implements javax. Locale that the client will
accept content in, based on the Accept-Language header.
|
| public Enumeration | getLocales()
Implements javax. Enumeration of Locale objects
indicating, in decreasing order starting with the preferred locale, the
locales that are acceptable to the client based on the Accept-Language
header.
|
| public String | getLocalName()
Implements javax. |
| public int | getLocalPort()
Implements javax. |
| public String | getMethod()
Implements javax. |
| public String | getParameter(String
a name)String specifying the name of the parameterImplements javax. String,
or null if the parameter does not exist.
|
| public Map | getParameterMap()
Implements javax. |
| public Enumeration | getParameterNames()
Implements javax. Enumeration of String
objects containing the names of the parameters contained
in this request.
|
| public MultiMap | |
| public String[] | getParameterValues(String
a name)String containing the name of
the parameter whose value is requestedImplements javax. String objects containing
all of the values the given request parameter has, or
null if the parameter does not exist.
|
| public String | getPathInfo()
Implements javax. |
| public String | getPathTranslated()
Implements javax. |
| public String | getProtocol()
Implements javax. |
| public String | |
| public String | getQueryString()
Implements javax. |
| public BufferedReader | getReader()
Implements javax. BufferedReader.
|
| public String | getRealPath(String
the path for which the real path is to be returned. path)Implements javax. |
| public String | getRemoteAddr()
Implements javax. |
| public String | getRemoteHost()
Implements javax. |
| public int | getRemotePort()
Implements javax. |
| public String | getRemoteUser()
Implements javax. null if the user
has not been authenticated.
|
| public static 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 javax. RequestDispatcher object that acts as a wrapper for
the resource located at the given path.
|
| public String | getRequestedSessionId()
Implements javax. |
| public String | getRequestURI()
Implements javax. |
| public StringBuffer | getRequestURL()
Implements javax. |
| public Map | |
| public StringBuilder | |
| public String | getScheme()
Implements javax. http, https, or ftp.
|
| public String | getServerName()
Implements javax. |
| public int | getServerPort()
Implements javax. |
| public ServletContext | getServletContext()
Implements javax. |
| public String | |
| public String | getServletPath()
Implements javax. |
| public ServletResponse | |
| public HttpSession | getSession()
Implements javax. |
| 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 javax. HttpSession
associated with this request or, if there is no
current session and create is true, returns
a new session.
|
| public SessionManager | |
| public long | |
| public Buffer | |
| public HttpURI | |
| public Principal | getUserPrincipal()
Implements javax. java.security.Principal object containing
the name of the current authenticated user.
|
| public UserRealm | |
| public boolean | |
| public boolean | isRequestedSessionIdFromCookie()
Implements javax. Checks whether the requested session ID was conveyed to the server as an HTTP cookie. |
| public boolean | |
| public boolean | isRequestedSessionIdFromURL()
Implements javax. Checks whether the requested session ID was conveyed to the server as part of the request URL. |
| public boolean | isRequestedSessionIdValid()
Implements javax. |
| public boolean | isSecure()
Implements javax. |
| public boolean | isUserInRole(String
a role)String specifying the name
of the roleImplements javax. |
| public HttpSession | |
| protected void | |
| public void | removeAttribute(String
a name)String specifying
the name of the attribute to removeImplements javax. |
| public synchronized void | |
| public void | |
| public void | |
| public void | setAttribute(String
a name, Object String specifying
the name of the attributethe value)Object to be storedImplements javax. |
| public void | |
| public void | |
| public void | setCharacterEncoding(String
String containing the name of
the character encoding.Implements javax. |
| public void | |
| protected void | |
| public void | |
| public void | |
| public void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setRequestedSessionIdFromCookie(boolean
The requestedSessionIdCookie to set. requestedSessionIdCookie)
|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public String | toString()
Overrides org. |