Request parameter

From VYRE

Jump to: navigation, search

Since 4.4 the request parameters passed to the page can be viewed in XSL, velocity and JSTL.

Contents

Usage

For a URL

http://domain.com/page_name?param=value

The following code can be used to retrieve the value:

XSL

At the top of the file.

<xsl:param name="request_param" ></xsl:param>

Where the value is required.

<xsl:value-of test="$request_param"/>

Velocity

$request_param, for example:

#if ($request_param == 'value') ... #end

JSTL

${request["param"]}

Adding Request parameters programatically

It is possible to set request parameters programatically (for example if a custom filter is set up).

This is possible by setting or updating the Map<String,Object> that is set on the request with a key of "vyre.publishing.RequestAttribute", this map is merged with any parameters that are passed on the URL.

See Also

Personal tools