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
The
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.
the HTTP session methods
will all return null sessions until such time as a request has been passed to
a
org.mortbay.jetty.servlet.SessionHandler which checks for session cookies
and enables the ability to create new sessions.
The
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.
A request instance is created for each
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.
author: gregw
Reconstructs the URL the client used to make the request. The returned URL contains a
protocol, server name, port number, and, but it does not include a path.
Because this method returns a StringBuffer, not a string, you can modify the
URL easily, for example, to append path and query parameters.
This method is useful for creating redirect messages and for reporting errors.
"scheme://host:port"
public void setQueryEncoding(String queryEncoding)(Code)
Set the character encoding used for the query string.
This call will effect the return of getQueryString and getParamaters.
It must be called before any geParameter methods.
The request attribute "org.mortbay.jetty.Request.queryEncoding"
may be set as an alternate method of calling setQueryEncoding.
Parameters: queryEncoding -
setQueryString
public void setQueryString(String queryString)(Code)
Parameters: queryString - The queryString to set.
setRequestURI
public void setRequestURI(String requestURI)(Code)
Parameters: requestURI - The requestURI to set.
setRequestedSessionId
public void setRequestedSessionId(String requestedSessionId)(Code)
Parameters: requestedSessionId - The requestedSessionId to set.
setRequestedSessionIdFromCookie
public void setRequestedSessionIdFromCookie(boolean requestedSessionIdCookie)(Code)
Parameters: requestedSessionIdCookie - The requestedSessionIdCookie to set.