There is some time before SiteMesh 3 comes prime time, so there is plenty of time for thought here. I do love the idea of wiring it up directly...

However, since SiteMeshFilter requires the dispatcher to handle requests, you would have to incorporate the SiteMesh filter directly into the struts filter chain, and I think this would require struts to absorb much of the sitemesh codebase (unless the SiteMesh developer were to refactor the code a whole lot more to allow it to plug in to other filters and not be a filter on its own). The same thing would go for the dispatchers, since struts would have to insert them on the chain as well. It does seem like a lot of work without a noticeable benefit to the users (they still have to configure a decorators file, etc., and which filters/dispatchers are potentially causing conflicts would be hidden from the user). Additionally, they still would have to configure the dispatcher, at least for the request mapping, and I think it is less intuitive to put it into a struts config file than web.xml where they are used to such configurations (again, at this time).

With all that said, if you want to take on the task of working with SiteMesh 3 and making it truly pluggable and modular (such as a JCatapult module), that would be awesome. Once that happens the work on the Struts side shouldn't be so bad (presuming the core architecture is in place)! If the convention of Struts is to configure and deploy everything, including JSP dispatcher, etc. then I love the idea!

-- Christian



On Oct 23, 2009, at 11:13 AM, Brian Pontarelli wrote:

I was never big on the Servlet or Filter models. It seems to me that Struts2 is moving heavily towards conventions and the more things are just "pluggable" the easier it will be for users. I feel that the best approach would be for Struts2 to discover SiteMesh in the class path and wire it up automatically. I'd also wonder if this could be another case for some additional annotations in addition to XML configuration for defining templates.

Anyways, this is how I would proceed and leverage SiteMesh 3. This is my plan for JCatapult.

-bp


--
           _,--"
cws        `-._        ________-_______         "----
       _----'--'--------------------------------'--'----_
      //_| | \ Christian Stone, Software Engineer / | |_\\
     (_____|_|__=     xt...@stonescape.net     =__|_|_____)
     _\_____=__   http://xtian.stonescape.net/        ___/_
       \/-(o)-~~-(o)-~~-(o)-`------'-(o)-~~-(o)-~~-(o)-\/



Reply via email to