---- | |
Deployment Notes: Tomcat | |
---- | |
Deployment Notes: Tomcat | |
Deploying Tapestry applications into {{{http://tomcat.apache.org/}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, | |
{{{http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#archiveClasses}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 {{{quickstart/}quickstart 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.html}Jetty}} favors the filter over the index.html file. | |
* Logging | |
TODO: Discuss logging configuration for Tomcat. |