Deployment Notes: Tomcat

Deploying Tapestry applications into Tomcat is relatively easy, with one big caveat: you must not store your Tapestry component classes under WEB-INF/classes.

At startup, Tapestry needs to locate all your page and component classes, so that it can match page names in request URLs to page classes. Due to the way Tomcat creates ClassLoaders, this information is not accessible to Tapestry.

Fortunately, Maven has an option inside its war plugin, archiveClasses, that changes the packaging; instead of putting compiled classes and resource files in WEB-INF/classes, they are instead placed inside an additional JAR inside WEB-INF/lib. This keeps Tapestry happy at runtime.

The tapestry-simple archetype configures your project's Maven pom.xml file to make use of this option.

Tapestry 5 has been tested with Tomcat 5.5.20.

index.html

If your application has an index.html file, Tomcat appears to use that file, rather than triggering the Tapestry filter to render the application Start page for a base URL (just the context path).

By contrast, Jetty favors the filter over the index.html file.

Logging

TODO: Discuss logging configuration for Tomcat.