 Resin reflects the servlet request object
directly from the servlet interface, so all the functions listed in
the servlet javadoc are available.
The only difference in the interface is the form
parameter.
Request
|
serverName |
Returns the name of the requested server, i.e. the host portion of the
requesting url.
|
serverPort |
Returns the port for the requested server.
|
remoteHost |
Returns the client's machine name.
|
remoteAddr |
Returns the client's IP address name.
|
method |
Returns the http method, for example 'GET' or 'POST'.
|
scheme |
Returns the url scheme, for example 'http' or 'https'.
|
requestURI |
Returns the path of the URL preceeding any query string.
|
servletPath |
Returns the url path referring to the jsp script.
|
pathInfo |
Returns the url's optional path information following the servletPath.
|
pathTranslated |
Returns the url's optional path information following the jsp
script name, translated to a real path on the server.
|
queryString |
Returns any query string in the url.
|
protocol |
Returns the protocol, for example 'HTTP/1.1'.
|
header[name] |
Returns the value of the named http header as a string. |
intHeader[name] |
Returns the value of the named http header as a number.
|
dateHeader[name] |
Returns the value of the named http header interpreted as a date, as a
long.
|
authType |
Returns the authentication type.
|
remoteUser |
Returns the remote user, retrieved from the authentication info.
|
cookies |
Returns the array of cookies for the request.
|
getRequestedSessionId() |
Returns the session id from the request.
|
isRequestedSessionIdFromCookie() |
Returns true if the server found the session id from a cookie.
|
isRequestedSessionIdFromUrl() |
Returns true if the server grabbed session id from the url.
|
isRequestedSessionIdValid() |
Returns true if the session id is valid. If not, then a call to
getSession would return null.
|
getSession(create) |
Returns the current session object. |
attribute[name] |
Returns server-specific attributes.
|
contentType |
Returns the mime-type of any POST data.
|
contentLength |
Returns the length of any POST data, -1 if there is no data.
|
characterEncoding |
Returns the encoding scheme for any POST data.
|
inputStream |
Returns a java.io.InputStream for reading the POST data.
|
reader |
Returns a java.io.Reader for reading the POST data.
|
form[name] |
Retrieves data from the query string or the form. |
Returns the name of the requested server, i.e. the host portion of the
requesting url.
Returns the port for the requested server.
Returns the client's machine name.
Returns the client's IP address name.
Returns the http method, for example 'GET' or 'POST'.
Returns the url scheme, for example 'http' or 'https'.
Returns the path of the URL preceeding any query string.
Returns the url path referring to the jsp script.
Returns the url's optional path information following the servletPath.
Returns the url's optional path information following the jsp
script name, translated to a real path on the server.
Returns any query string in the url.
Returns the protocol, for example 'HTTP/1.1'.
Returns the value of the named http header as a string.
for (name in Request.header) {
Response.printf("%-20s %s\n", name, Request.header[name]);
}
|
accept-charset iso-8859-1,*,utf-8
pragma no-cache
accept image/gif, image/jpeg, image/png, */*
accept-language en
user-agent Mozilla/4.5b1 [en] (X11; I; Linux 2.0.29 i686)
host localhost:8080
connection Keep-Alive
accept-encoding gzip
|
Returns the value of the named http header as a number.
Returns the value of the named http header interpreted as a date, as a
long.
Returns the authentication type.
Returns the remote user, retrieved from the authentication info.
Returns the array of cookies for the request.
Returns the session id from the request.
isRequestedSessionIdFromCookie()
|
Returns true if the server found the session id from a cookie.
isRequestedSessionIdFromUrl()
|
Returns true if the server grabbed session id from the url.
isRequestedSessionIdValid()
|
Returns true if the session id is valid. If not, then a call to
getSession would return null.
Returns the current session object.
If there is no session object and create is true,
getSession will create a new one.
Note: This must be called before writing any output.
Returns server-specific attributes.
Returns the mime-type of any POST data.
Returns the length of any POST data, -1 if there is no data.
Returns the encoding scheme for any POST data.
Returns a java.io.InputStream for reading the POST data.
Returns a java.io.Reader for reading the POST data.
Retrieves data from the query string or the form.
This is a wrapper around the Servlet getParameterValues call.
/test.jsp?Company=MarxBros&Employees=Groucho+Harpo+Chico
for (name in request.form) {
out.writeln(name + ": " + Request.form[name].join(':'));
}
|
Company: MarxBros
Employees: Groucho:Harpo:Chico
|
Copyright © 1998-2000 Caucho Technology. All rights reserved.
Last modified: Mon, 03 Apr 2000 11:20:13 -0700 (PDT)
|