I did create a library, in which I refer to the pages and jwc files explicitly. This seems to aid finding the pages and components, but not the templates. Somehow the search-rule of finding the templates along with the components and pages in the same directory does not work.

I started out with all in the WEB-INF directory. If you want to put the .html/.jwc files in the same directory as the .page you can, Tapestry will find it automatically. Then the .java file can be anywhere, you just specify it's location in the .jwc. That is the simplest model. A bit more complicated is to create sub-directories under the WEB-INF, then you have to tell Tapestry, via the .application file where to find the components.

A more complicated, but more in line with the Tapestry Model is to create libraries, like "contrib". I started out with the simple model and then needed to create libraries. Eventually, I wanted to create libraries, in order to do that I had to move everything around.

Creating libraries is pretty simple. In the directory/package for the .java, I put the .html and the .jwc. I put a .library file and jar it all together. Then I include the .library in the .application. Then whenever, I want to reference one of my components, I just prefix it like you would "contrib".

HTH,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 10/24/2006 9:42 AM
To: users@tapestry.apache.org
Subject: defining paths for templates

The people in the project I'm in prefer to keep the java-sources and
tapestry files that belong together in one and the same directory
(Home.java together with Home.page en Home.html, for example). This
basically means that all Tapestry-files will be placed outside of
WEB-INF.

Now I finally succeded to get Tapestry to find the jwc and page files.
Alas, tapestry won't load the related templates. I even tried the
trick of using an asset, like this:

<asset name="$template" path="Home.html"/>

But this doesn't work either, as Tapestry complains about not being
able to find the html file on the class path. It also seems
superfluous to me, since tapestry is supposed to find the templates in
the same directory as the page or component files.

If anyone has any pointers, I'll be grateful.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to