<ao:forward>

Forwards to another resource. Stops processing of the containing JSP page. This has three advantages over the standard <jsp:forward> tag:

  1. You may clear parameters such that only those specifically added will be passed on to the next page
  2. You may have other nested tags used to select and build the set of parameters
  3. You may pass argument objects instead of only String parameters (see below)

Any attribute that has no namespace and begins with param. is added to the parameters. The parameter name is the part of the attribute name following param..

When a parameter value is null it is not added. If the value is an Iterable, Iterator, Enumeration, or array, then each non-null element is coerced to String as a separate parameter in iteration order. Otherwise, the value itself is coerced to String for the parameter value.

Nested <ao:param> or <ao:params> tags will add parameters after any provided as attributes. If parameters are not cleared, nested parameters are added before request parameters.

Argument objects are passed to the forwarded page via request-scope arg Map. Any arguments to the current JSP page are not automatically passed-on to the forwarded page (this differs from parameters in this way).

Any attribute that has no namespace and begins with arg. is added as an argument. The argument name is the part of the attribute name following arg.. Because this argument becomes an element in the Map named arg in the forwarded page, the attribute name and JSP Expression Language name will match precisely.

Nested <ao:arg> tags may also be used to pass arguments.

It is an error for the same argument name to be used twice (including when set as null).

Tag Information

Tag Class: com.aoindustries.taglib.ForwardTag
TagExtraInfo Class: None
Body Content: scriptless
Display Name: None
Dynamic Attributes: true

Attributes

Name Required Evaluation Type Description
page No Runtime String

The page that will be forwarded to. A nested <ao:page> tag will override this value. The page is required, must be set in attribute or nested <ao:page> tag.

Security Note: page must be a trusted value since it can access any resource available via RequestDispatcher. It would be incorrect to use a value that can be manipulated by a client in any way.

Recommend use of <ao:base> on target page to have relative paths interpreted from the forwarded-to page.

clearParams No Static String

Optionally clears all parameters that match any of the comma-separated patterns. This is so that only those added by nested tags are forwarded. As a result, parameters provided by the client will not be able to interfere for forwards that have optional parameters. Each pattern in the comma-separated list may in the following format:

exact_name matches the name exactly
* matches all (clears all parameters)
*suffix matches the name with "endsWith"
prefix* matches the name with "beginsWith"

Defaults to none cleared.

Variables

No Variables Defined.