<context-asset> element

Specifies an asset located relative to the web application context root folder. Context assets may be localized.

Assets for an instantiated component (or page) may be accessed using the OGNL expression assets.name.

The path may be either absolute or relative. Absolute paths start with a leading slash, and are evalulated relative to the context root. Relative paths are evaluated relative to the application root, which is typically the same as the context root (the exception being a WAR that contains multiple Tapestry applications, within multiple subfolders).

Figure C.12. <context-asset> Attributes

NameTypeRequired ?Default ValueDescription
namestringyes The name of the asset, which must be a valid Java identifier.
pathstringyes The path to the asset.