The FreeMarker template language supports the notion of a method, which encapsulates
an action to perform on a set of input parameters and can return an output
provides many methods of its own, it also
allows the registration of custom methods. The Web Script Framework provides the following
methods specifically for developers of web script response templates.
- Returns an absolute URL representation of the passed URL. Useful when rendering links
within Atom (and similar formats).
- Returns an ISO8601-formatted result of the passed date. Useful when rendering dates
- Returns a URL that references this web script. The passed queryString
is added to the URL. System arguments such as guest and
format are automatically added. This method is particularly useful
for protection against the runtime environment within which the web script is executing.
In some environments, such as a Portal, the URL is encoded.
- argreplace(argString, argName, argValue, ...)
- Replaces the specified argName with argValue or adds
argName if it does not exist in argString.
- Encodes the string into URL-safe form.