2.3. Page Specification

Home.page. 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification PUBLIC
    "-//Apache Software Foundation//Tapestry Specification 3.0//EN" 
    "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd"> 1 

<page-specification class="org.apache.tapestry.html.BasePage"> 2 
    <context-asset name="$template" path="Home.html" /> 3 
</page-specification>

1

Tapestry specification document type definition.

2

JavaBeans page class. class identifies the JavaBeans class for the page. BasePage is a Tapestry provided class that we can use as-is when there is no need for specialized behavior like in this case. When there is a need for specialized behavior, this class is typically extended.

3

Page template. Tapestry's term for templates, images, scripts etc is Asset. We will learn more about assets later, for now all we have to know is that $template is a special asset name that identifies the template for the page. The path here is relative to the application context.

The naming convention for the page specification is, the name of the page with a .page extension and hence the name Home.page.