Looking at some presentation options for Struts, the frontrunners being Tiles and SiteMesh.
I really like the idea of SiteMesh, even more so after playing with Tiles (which adds its own management problems into the equation with the requirement to edit tiles-defs.xml for each new page, and forcing you to author html fragments rather than real McKoy valid pages). Sitemesh look very elegant and ultra-low-maintence when adding new pages!
Unfortunately, though, I can’t Sitemesh to run under Tomcat (either 4.1.24 or 5.0.16). Both give the same deal:
org.apache.jasper.JasperException: getOutputStream() has already been called for this response ... at com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:169)
The readme makes noice about using jsp rather than html for page extensions, but even changing that just gives me..
org.apache.jasper.JasperException: Cannot call getWriter() after getOutputStream()
at the same line. The readme also notes that Sitemesh has issues on WebSphere, WebLogic, and other containers… so I may just be one of the unlucky ones.
Anyways, I’m not doing anything tricky, just autodeploying the sitemesh-example.war that comes with the package.
Anyone got it working on Tomcat? I’m playing with sitemesh-2.0.1.