I just spent an hour or two updating the Tapestry In Action examples. This new source code distribution will be available from Manning's web site, in the meantime you can get it here (3.3 MB).
Changes:
- Now works with and requires, Tomcat 5 (tested with 5.0.25).
examples.war
renamed totiaexamples.war
, to not conflict with Tomcat's built-in examples.- No longer changes Tomcat's
server.xml
- Now includes the Tapestry 3.0 libraries and dependencies ... no seperate download needed.
Why include the libraries? Because it turns out that the exect version of the Tapestry framework is critical
to getting the WAR to deploy. Initially I couldn't get tiaexamples.war to deploy and it took me forever to
track it down; there's a reference to the Tapestry JAR in its web.xml
:
<taglib> <taglib-uri>http://jakarta.apache.org/tapestry/tld/tapestry_1_0.tld</taglib-uri> <taglib-location>/WEB-INF/lib/tapestry-3.0.jar</taglib-location> </taglib>If that JAR doesn't exist (say because you tried to deploy using 3.0-rc-1) then the WAR just doesn't deploy. You have to dig through the Tomcat logs for a while before you find the problem. The best solution was to ensure that the version matches up by including all the libraries and dependencies (getting the dependencies being every newbies #1 issue). Because this distribution isn't served off of apache.org or a mirror, including the dependencies is completely legitimate.
Just curious - why do you require Tomcat 5?
ReplyDeleteNot that I'm aware of. Point me at some documentation; the official docs for JSPs are very, very weak on this subject. Most people export the .tld file and store it directly in WEB-INF. To me, its another "smoking room" decision where nobody bothered to work out in the specification something that actually worked.
ReplyDeleteThe final Tapestry 3.0 release was compiled against the 2.3 JSP apis which did not appear to be compatible with Tomcat 4. I got class loading errors related to a changed method signature.
Since it works under Tomcat 5 and virtually everyone is interested in Tomcat 5, I changed the Ant build scripts to just support Tomcat 5.