Dummy request object, used for request dispatcher mapping, as well as
JSP precompilation.
addCookie
public void addCookie(Cookie cookie)
Add a Cookie to the set of Cookies associated with this Request.
- addCookie in interface HttpRequest
cookie
- The new cookie
addHeader
public void addHeader(String name,
String value)
Add a Header to the set of Headers associated with this Request.
- addHeader in interface HttpRequest
name
- The new header namevalue
- The new header value
addLocale
public void addLocale(Locale locale)
Add a Locale to the set of preferred Locales for this Request. The
first added Locale will be the first one returned by getLocales().
- addLocale in interface HttpRequest
locale
- The new preferred Locale
addParameter
public void addParameter(String name,
values[] )
Add a parameter name and corresponding set of values to this Request.
(This is used when restoring the original request on a form based
login).
- addParameter in interface HttpRequest
name
- Name of this request parameter
clearCookies
public void clearCookies()
Clear the collection of Cookies associated with this Request.
- clearCookies in interface HttpRequest
clearHeaders
public void clearHeaders()
Clear the collection of Headers associated with this Request.
- clearHeaders in interface HttpRequest
clearLocales
public void clearLocales()
Clear the collection of Locales associated with this Request.
- clearLocales in interface HttpRequest
clearParameters
public void clearParameters()
Clear the collection of parameters associated with this Request.
- clearParameters in interface HttpRequest
createInputStream
public ServletInputStream createInputStream()
throws IOException
Create and return a ServletInputStream to read the content
associated with this Request.
- createInputStream in interface Request
finishRequest
public void finishRequest()
throws IOException
Perform whatever actions are required to flush and close the input
stream or reader, in a single operation.
- finishRequest in interface Request
getAttribute
public Object getAttribute(String name)
getAttributeNames
public Enumeration getAttributeNames()
getAuthType
public String getAuthType()
getAuthorization
public String getAuthorization()
Return the authorization credentials sent with this request.
- getAuthorization in interface Request
getCharacterEncoding
public String getCharacterEncoding()
getContentLength
public int getContentLength()
getContentType
public String getContentType()
getContext
public Context getContext()
Return the Context within which this Request is being processed.
- getContext in interface Request
getContextPath
public String getContextPath()
getCookies
public Cookie[] getCookies()
getDateHeader
public long getDateHeader(String name)
getDecodedRequestURI
public String getDecodedRequestURI()
Get the decoded request URI.
- getDecodedRequestURI in interface HttpRequest
- the URL decoded request URI
getFilterChain
public FilterChain getFilterChain()
Get filter chain associated with the request.
- getFilterChain in interface Request
getHeader
public String getHeader(String name)
getHeaderNames
public Enumeration getHeaderNames()
getHeaders
public Enumeration getHeaders(String name)
getHost
public Host getHost()
Return the Host within which this Request is being processed.
- getHost in interface Request
getInfo
public String getInfo()
Return descriptive information about this Request implementation and
the corresponding version number, in the format
<description>/<version>
.
- getInfo in interface Request
getInputStream
public ServletInputStream getInputStream()
throws IOException
getIntHeader
public int getIntHeader(String name)
getLocalAddr
public String getLocalAddr()
getLocalName
public String getLocalName()
getLocalPort
public int getLocalPort()
getLocale
public Locale getLocale()
getLocales
public Enumeration getLocales()
getMethod
public String getMethod()
getNote
public Object getNote(String name)
Return the object bound with the specified name to the internal notes
for this request, or null
if no such binding exists.
- getNote in interface Request
name
- Name of the note to be returned
getNoteNames
public Iterator getNoteNames()
Return an Iterator containing the String names of all notes bindings
that exist for this request.
- getNoteNames in interface Request
getParameter
public String getParameter(String name)
getParameterMap
public Map getParameterMap()
getParameterNames
public Enumeration getParameterNames()
getParameterValues
public String[] getParameterValues(String name)
getPathInfo
public String getPathInfo()
getPathTranslated
public String getPathTranslated()
getProtocol
public String getProtocol()
getQueryString
public String getQueryString()
getReader
public BufferedReader getReader()
throws IOException
getRealPath
public String getRealPath(String path)
getRemoteAddr
public String getRemoteAddr()
getRemoteHost
public String getRemoteHost()
getRemotePort
public int getRemotePort()
getRemoteUser
public String getRemoteUser()
getRequest
public ServletRequest getRequest()
Return the ServletRequest
for which this object
is the facade.
- getRequest in interface Request
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String path)
getRequestURI
public String getRequestURI()
getRequestURL
public StringBuffer getRequestURL()
getRequestedSessionId
public String getRequestedSessionId()
getResponse
public Response getResponse()
Return the Response with which this Request is associated.
- getResponse in interface Request
getScheme
public String getScheme()
getServerName
public String getServerName()
getServerPort
public int getServerPort()
getServletPath
public String getServletPath()
getSession
public HttpSession getSession()
getSession
public HttpSession getSession(boolean create)
getSocket
public Socket getSocket()
Return the Socket (if any) through which this Request was received.
This should only be used to access underlying state
information about this Socket, such as the SSLSession associated with
an SSLSocket.
- getSocket in interface Request
getStream
public InputStream getStream()
Return the input stream associated with this Request.
- getStream in interface Request
getUserPrincipal
public Principal getUserPrincipal()
getWrapper
public Wrapper getWrapper()
Return the Wrapper within which this Request is being processed.
- getWrapper in interface Request
isRequestedSessionIdFromCookie
public boolean isRequestedSessionIdFromCookie()
isRequestedSessionIdFromURL
public boolean isRequestedSessionIdFromURL()
isRequestedSessionIdFromUrl
public boolean isRequestedSessionIdFromUrl()
isRequestedSessionIdValid
public boolean isRequestedSessionIdValid()
isSecure
public boolean isSecure()
isUserInRole
public boolean isUserInRole(String role)
recycle
public void recycle()
Release all object references, and initialize instance variables, in
preparation for reuse of this object.
- recycle in interface Request
removeAttribute
public void removeAttribute(String name)
removeNote
public void removeNote(String name)
Remove any object bound to the specified name in the internal notes
for this request.
- removeNote in interface Request
name
- Name of the note to be removed
setAttribute
public void setAttribute(String name,
Object value)
setAuthType
public void setAuthType(String authType)
Set the authentication type used for this request, if any; otherwise
set the type to null
. Typical values are "BASIC",
"DIGEST", or "SSL".
- setAuthType in interface HttpRequest
setAuthorization
public void setAuthorization(String authorization)
Set the authorization credentials sent with this request.
- setAuthorization in interface Request
authorization
- The new authorization credentials
setCharacterEncoding
public void setCharacterEncoding(String enc)
throws UnsupportedEncodingException
setConnector
public void setConnector(Connector connector)
Set the Connector through which this Request was received.
- setConnector in interface Request
connector
- The new connector
setContentLength
public void setContentLength(int length)
Set the content length associated with this Request.
- setContentLength in interface Request
length
- The new content length
setContentType
public void setContentType(String type)
Set the content type (and optionally the character encoding)
associated with this Request. For example,
text/html; charset=ISO-8859-4
.
- setContentType in interface Request
type
- The new content type
setContext
public void setContext(Context context)
Set the Context within which this Request is being processed. This
must be called as soon as the appropriate Context is identified, because
it identifies the value to be returned by getContextPath()
,
and thus enables parsing of the request URI.
- setContext in interface Request
context
- The newly associated Context
setContextPath
public void setContextPath(String path)
Set the context path for this Request. This will normally be called
when the associated Context is mapping the Request to a particular
Wrapper.
- setContextPath in interface HttpRequest
path
- The context path
setDecodedRequestURI
public void setDecodedRequestURI(String uri)
Set the decoded request URI.
- setDecodedRequestURI in interface HttpRequest
uri
- The decoded request URI
setFilterChain
public void setFilterChain(FilterChain filterChain)
Set filter chain associated with the request.
- setFilterChain in interface Request
filterChain
- new filter chain
setHost
public void setHost(Host host)
Set the Host within which this Request is being processed. This
must be called as soon as the appropriate Host is identified, and
before the Request is passed to a context.
- setHost in interface Request
host
- The newly associated Host
setMethod
public void setMethod(String method)
Set the HTTP request method used for this Request.
- setMethod in interface HttpRequest
method
- The request method
setNote
public void setNote(String name,
Object value)
Bind an object to a specified name in the internal notes associated
with this request, replacing any existing binding for this name.
- setNote in interface Request
name
- Name to which the object should be boundvalue
- Object to be bound to the specified name
setPathInfo
public void setPathInfo(String path)
Set the path information for this Request. This will normally be called
when the associated Context is mapping the Request to a particular
Wrapper.
- setPathInfo in interface HttpRequest
path
- The path information
setProtocol
public void setProtocol(String protocol)
Set the protocol name and version associated with this Request.
- setProtocol in interface Request
protocol
- Protocol name and version
setQueryString
public void setQueryString(String query)
Set the query string for this Request. This will normally be called
by the HTTP Connector, when it parses the request headers.
- setQueryString in interface HttpRequest
query
- The query string
setRemoteAddr
public void setRemoteAddr(String remoteAddr)
Set the remote IP address associated with this Request. NOTE: This
value will be used to resolve the value for getRemoteHost()
if that method is called.
- setRemoteAddr in interface Request
setRemoteHost
public void setRemoteHost(String remoteHost)
setRequestURI
public void setRequestURI(String uri)
Set the unparsed request URI for this Request. This will normally be
called by the HTTP Connector, when it parses the request headers.
- setRequestURI in interface HttpRequest
uri
- The request URI
setRequestedSessionCookie
public void setRequestedSessionCookie(boolean flag)
Set a flag indicating whether or not the requested session ID for this
request came in through a cookie. This is normally called by the
HTTP Connector, when it parses the request headers.
- setRequestedSessionCookie in interface HttpRequest
flag
- The new flag
setRequestedSessionId
public void setRequestedSessionId(String id)
Set the requested session ID for this request. This is normally called
by the HTTP Connector, when it parses the request headers.
- setRequestedSessionId in interface HttpRequest
id
- The new session id
setRequestedSessionURL
public void setRequestedSessionURL(boolean flag)
Set a flag indicating whether or not the requested session ID for this
request came in through a URL. This is normally called by the
HTTP Connector, when it parses the request headers.
- setRequestedSessionURL in interface HttpRequest
flag
- The new flag
setResponse
public void setResponse(Response response)
Set the Response with which this Request is associated.
- setResponse in interface Request
response
- The new associated response
setScheme
public void setScheme(String scheme)
Set the name of the scheme associated with this request. Typical values
are http
, https
, and ftp
.
- setScheme in interface Request
scheme
- The scheme
setSecure
public void setSecure(boolean secure)
Set the value to be returned by isSecure()
for this Request.
- setSecure in interface Request
secure
- The new isSecure value
setServerName
public void setServerName(String name)
Set the name of the server (virtual host) to process this request.
- setServerName in interface Request
name
- The server name
setServerPort
public void setServerPort(int port)
Set the port number of the server to process this request.
- setServerPort in interface Request
port
- The server port
setServletPath
public void setServletPath(String path)
Set the servlet path for this Request. This will normally be called
when the associated Context is mapping the Request to a particular
Wrapper.
- setServletPath in interface HttpRequest
path
- The servlet path
setSocket
public void setSocket(Socket socket)
Set the Socket (if any) through which this Request was received.
- setSocket in interface Request
socket
- The socket through which this request was received
setStream
public void setStream(InputStream input)
Set the input stream associated with this Request.
- setStream in interface Request
setUserPrincipal
public void setUserPrincipal(Principal principal)
Set the Principal who has been authenticated for this Request. This
value is also used to calculate the value to be returned by the
getRemoteUser()
method.
- setUserPrincipal in interface HttpRequest
principal
- The user Principal
setWrapper
public void setWrapper(Wrapper wrapper)
Set the Wrapper within which this Request is being processed. This
must be called as soon as the appropriate Wrapper is identified, and
before the Request is ultimately passed to an application servlet.
- setWrapper in interface Request
wrapper
- The newly associated Wrapper