Template locations

The general rule of thumb is that a page's HTML template is simply an HTML file, stored in the context root directory. That is, you'll have a MyPage.html HTML template, a WEB-INF/MyPage.page page specification, and a MyPage class, in some Java package.

Tapestry always starts knowing the name of the page and the location of the page's specification when it searches for the page's HTML template. Starting with this, it performs the following search:

In addition, any HTML template in the web application context is considered a page, even if there is no matching page specification. For simple pages that don't need to have any page-specific logic or properties, there's no need for a page specification. Such a page may still use the special Tapestry attributes (described in the following sections).

Finally, with some minor configuration it is possible to change the extension used for templates. For example, if you are developing a WML application, you may wish to name your files with the extension .wml.