Application Servlet

The application servlet is a "bridge" between the servlet container and the application engine. Its job is simply to create (on the first request) or locate (on subsequent requests) the application engine.

The application servlet must subclass ApplicationServlet and implement the method: getApplicationSpecificationPath(). This method provides the path to the application specification file; the servlet reads this file when it is initialized.

Figure 3.1. HelloWorldServlet.java

package tutorial.hello;

import com.primix.tapestry.*;

public class HelloWorldServlet extends ApplicationServlet
{
  protected String getApplicationSpecificationPath()
  {
    return "/tutorial/hello/HelloWorld.application";
  }

}