Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor reworking of intro paragraphs for clarity and static-ness.

...

In Tapestry, Assets are any kind of file static content that may be downloaded to a client web browser in addition to the dynamically generated HTML.Assets are most often images, stylesheets, , such as images, style sheets and JavaScript files.

Normal assets Assets are most commonly stored in the web application's context folder ... stored inside the web application WAR file in the ordinary wayusual JEE fashion.

Tapestry will also make In addition, Tapestry treats files stored on the classpath, with your Java class files, as assets visible to the web browser.

...

Components learn about assets via injection. The @Inject @Inject annotation allows Assets to be injected into components as read-only properties. The path to the resource is specified using the Path annotation.:

Code Block
java
java
  @Inject
  @Path("context:images/tapestry_banner.gif")
  private Asset banner;

...