This post originated from an RSS feed registered with Java Buzz
by Marc Logemann.
Original Post: decorate with Sitemesh
Feed Title: Marc's Java Blog
Feed URL: http://www.logemann.org/day/index_java.xml
Feed Description: Java related topics for all major areas. So you will see J2ME, J2SE and J2EE issues here.
A few weeks ago i started using Sitemesh and i never looked back. This library is small but very powerfull. When you start exploring Sitemesh, you most likely use ConfigDecoratorMapper as outlined in the starter docs. But soon you want more and i thought it would be nice to have a mapper that acts on session attributes. To be honest, i was ready to start with the coding and saw that someone was faster than me and allready supplied it with sitemesh (SessionDecoratorMapper) ;-)
You only need to read through the available DecoratorMappers and suddenly you imagine thousands of nice things you can do with your application/website layout, depending on the craziest parameters. How about a SeasonsDecoratorMapper which is linked to actual seasons. Sometimes simple things are the best ones.
You could even decorate PHP or Perl based plugins to your application by reading in the output of your PHP/Perl script via NetworkStream and let Sitemesh decorate also this stuff. Didnt tried it yet, but this should be straightforward.