The application specification is used to describe the application to the Tapestry framework. It provides the application with a name, an engine class, and a list of pages.
This specification is a file that is located on the Java class path. In a deployed Tapestry application, the specification lives with the application's class files, in the WEB-INF/classes directory of a War file.
Figure 3.2. HelloWorld.application
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE application PUBLIC "-//Howard Ship//Tapestry Specification 1.1//EN" "http://tapestry.sf.net/dtd/Tapestry_1_1.dtd"> <application name="Hello World Tutorial" engine-class="com.primix.tapestry.engine.SimpleEngine"> <page name="Home" specification-path="/tutorial/hello/Home.jwc"/> </application> |
Our application is very simple; we give the application a name, use the standard engine, and define a single page, named "Home". In Tapestry, pages and components are specified with the path to their specification file (a file that end with '.jwc').
Page "Home" has a special meaning to Tapestry: when you first launch a Tapestry application, it loads and displays the "Home" page. All Tapestry applications are required to have such a home page.