Detailed reference of prototypes, properties and methods available in the
Javascript environment of your Helma web applications.

Default properties and methods of the req object.
RequestBean req
This object is automatically instantiated as the req property of the global object (or global.req) and there is no constructor to instantiate further instances.
The req object is a host object representing the request that is currently handled by the scripting environment.

For further details also see the JavaDocs for helma.framework.RequestBean. Since that class is a JavaBean all of its get- and set-methods are also directly available as properties of this object.

see

Packages.helma.framework.RequestBean

String req. action
Contains the name of the requested action
The name without the suffix '_action' is provided. This property is read-only.
Example:

    res.write(req.action);
    edit

Function req. actionHandler
The function in charge of handling the current request.
The req.actionHandler property allows the onRequest() method to set the function object to be invoked for handling the request, overriding the action resolved from the request path.
since: 1.7
Object req. cookies
Contains the cookie request parameters.
see

req.get
req.data
req.params
req.postParams
req.queryParams

Object req. data
Object containing any request parameters (GET, POST, Cookies, etc) and HTTP environmental variables.
This object contains all passed request parameters as named properties, no matter whether these have been submitted as URL-parameters, as part of a HTTP POST request, or as cookie values.
When more than one value is submitted for the same parameter name, req.data.paramname contains just a single (the first) value. That is why all parameters are additionally also provided with their values inside an array, through properites called req.data.paramname_array (the same parameter name, with an _array suffix attached).
Parameters can be grouped into objects using a "objectid[partid]" syntax in the parameter name. For example, a parameter name of "foo[bar]" will result in a req.data.foo object being created. The actual parameter value will be available at req.data.foo.bar. This feature can be used recursively, meaning that a parameter named "foo[bar][dong]" will result in req.data.foo.bar.dong.
Uploaded files are available in req.data as a MimePart object.
Additionally Helma sets the following HTTP environment variables if they are available:

authorization
  Equivalent to the variable 'authorization' sent in the request header.
http_browser
  Name and version of the client browser. Equivalent to the variable 'User-Agent' sent in the request header.
http_host
  Host name to which that request was sent to. Equivalent to the variable 'Host' sent in the request header.
http_language
  Equivalent to the variable 'Accept-Language' sent in the request header.
http_language
  Equivalent to the variable 'Accept-Language' sent in the request header.
http_remotehost
  IP-Address of the client machine. Equivalent to a getRemoteAddr() call on the servletRequest.
http_referer
  URL of the page the user came from. Equivalent to the variable 'Referer' sent in the request header.
http_get_remainder
  Provides access to any bytes remaining after GET parameter parsing.
http_post_remainder
  Provides access to any bytes remaining after POST parameter parsing.

All properties of req.data are read- and write-able.
see

req.get

String req. method
Returns the HTTP method (in uppercase letters) of the current request.
Usually 'GET' or 'POST'. For non-web-requests this function will return one of the following: 'XMLRPC', 'EXTERNAL' or 'INTERNAL'.
see

req.isGet
req.isPost

Object req. params
Contains any GET and POST request parameters.
Combined properties of req.postParams and req.queryParams
see

req.get
req.data
req.postParams
req.queryParams
req.cookies

String req. password
Returns the decrypted basic authentication password.
Only for requests that contain user credentials sent with ' basic authentication scheme' method, typically as a result of a previously returned 401 HTTP response.
see

req.username

String req. path
Contains the path of the current request, relative to the application's mountpoint.
Starts without a preceding slash. This property is read-only.
see

req.uri

Object req. postParams
Contains any post request parameters.
see

req.get
req.data
req.params
req.queryParams
req.cookies

Object req. queryParams
Contains any GET request style query string parameters.
see

req.get
req.data
req.params
req.postParams
req.cookies

Number req. runtime
The running time of the current request in milliseconds
Provides the amount of time that has elapsed since the start of the processing of the current request, measured in milliseconds (integer).
String req. uri
Contains the full request URI path from the web server root.
Compared to req.path, which only contains the path from wherever the application is mounted, req.uri provides easy access to the full request URI. The purpose is to make it easy to link to the current page without having to invoke href(). For internal (non-HTTP) invocations, req.uri is null.
since: 1.7
see

req.path
HopObject.href

String req. username
Contains the decrypted basic authentication username.
Only for requests that contain user credentials sent with ' basic authentication scheme' method, typically as a result of a previously returned 401 HTTP response.
see

req.password

Methods
req. get(name)
An alternative method of accessing properties otherwise made available through the req.data object.
parameters

String | name | as String, the request data property to read

see

req.data

req. getHeader(name)
Returns the specified header value, or null
If there are several headers by that name, the first header value is returned. Proxy to HttpServletRequest.getHeader().
parameters

String | name | as String, the header name

returns

| String the header value, or null

see

req.getHeaders

req. getHeaders(name)
Returns an Array of all header values by the specified name
Proxy to HttpServletRequest.getHeaders(), returns header values as string array.
parameters

String | name | as String, the header name

returns

| Array of Strings containing the header values

see

req.getHeader

req. getIntHeader(name)
Returns the specified header value as a Number
Proxy to HttpServletRequest.getIntHeader(), fails silently by returning -1.
parameters

String | name | as String, the header name

returns

| Number the header parsed as integer or -1

req. getDateHeader(name)
Returns the specified header value as a Date object
Proxy to HttpServletRequest.getDateHeader(), fails silently by returning -1.
parameters

String | name | as String, the header name

returns

| Date the date in milliseconds, or -1

req. isGet()
Returns true if the current request is a HTTP GET request, false otherwise.
returns

| Boolean

see

req.isPost
req.method

req. isPost()
Returns true if the current request is a HTTP POST request, false otherwise.
returns

| Boolean

see

req.isGet
req.method

req. getServletRequest()
Provides access to the HttpServletRequest object
Returns an instance of the Java HttpServletRequest Class corresponding to the current request, which allows full access to the methods of that class.
returns

| Packages.javax.servlet.http.HttpServletRequest object of the current request

see

Packages.javax.servlet.http.HttpServletRequest

Tue, 25 Nov 2008 16:50:13 GMT.

### core framework

- global
- app (application)
- req (request)
- res (response)
- session
- path
- root
- HopObject
- User
- File
- FtpClient
- Image
- Mail
- Remote
- Xml
- DatabaseObject
- MimePart
- Skin
- Object

### optional modules

- Array extensions
- Date extensions
- Number extensions
- Object extensions
- String extensions
- HopObject extensions
- global macros
- macro filters
- JSON methods
- helma.Aspects
- helma.Chart
- helma.Color
- helma.Database
- helma.File
- helma.Ftp
- helma.Group
- helma.Html
- helma.Http
- helma.Image
- helma.Mail
- helma.Search
- helma.Skin
- helma.Ssh
- helma.Url
- helma.Zip
- jala.BitTorrent
- jala.Captcha
- jala.Date
- jala.db
- jala.DnsClient
- jala.Form
- jala.History
- jala HopObject extensions
- jala.HtmlDocument
- jala.I18n
- jala.ImageFilter
- jala.IndexManager
- jala.ListRenderer
- jala.Mp3
- jala.PodcastWriter
- jala.RemoteContent
- jala.Rss20Writer
- jala.Utilities
- jala.XmlRpcRequest
- jala.XmlWriter

### java libraries

- browse docjar