Resin 1.1
FAQ
Reference
JavaDoc
Demo
Java Tutorial
Getting Started
Configuration
Servlet
JSP
XTP/XSL
JavaScript
JS Library
Core Library
File Library
Servlet Library
Database Library
XML Library
PageContext
Request
Response
Session
Application
Servlet Request
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.
Request | Resin 1.0
### 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.
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
### 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. 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.
### 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. 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
PageContext |  | Response
Copyright © 1998-2000 Caucho Technology. All rights reserved. Last modified: Fri, 31 Mar 2000 18:54:43 -0800 (PST)