Includes another resource and then continues processing of the current JSP page. This has three advantages over the standard <jsp:include> tag:

  1. You may clear parameters such that only those specifically added will be passed on to the included 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 included page via request-scope arg Map. Any arguments to the current JSP page are not automatically passed-on to the included page (this differs from parameters in this way). The current JSP page arguments are restored when the include completes.

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 included 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.IncludeTag
TagExtraInfo Class: None
Body Content: scriptless
Display Name: None
Dynamic Attributes: true


Name Required Evaluation Type Description
page No Runtime String

The page that will be included. 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.

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 included As a result, parameters provided by the client will not be able to interfere for includes 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.


No Variables Defined.