[Thanks go to Daniel Jue, who answered my question on June 7, 2007]

For example, if you have this file:


You can access it in your page or component Java class like this:

private Asset thestyle;

public Asset getTheStyle() { return thestyle; }

And then in your page or component template:

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<title>My Title</title>
<link rel="stylesheet" type="text/css" href="${thestyle}"/>

Similarly, having src/main/webapp/images/MyLogo.gif Page or Component Class:

private Asset thelogo;

public Asset getTheLogo() { return theLogo; }

Page or Component Template (the html):

<img src="${thelogo}" />

Tapestry5WhereToStoreExternalResources (last edited 2009-09-20 23:20:47 by localhost)