Allan,

If you are simply selecting the body while the whole site has the same
wrapper, why use SiteMesh?  It is a filter which wraps anything matching
specific patterns (could be *.jsp, *.html, or even /someSection/* which
needs it's own look such as a cross site agreement) and kicks it out with
it's own wrapping JSP yet your body.  Bodies may also be nested depending on
the template.  Take a look at it at: http://www.opensymphony.com/sitemesh/

With Tiles, you could always make every page invoke one specific tile which
lists a Tile(s?)Controller in the definition.  That definition could parse
the URI (or pull the name from a scope bean created by your action) and
insert the appropriate "center" tile for you.  I'd recommend extending
org.apache.struts.tiles.ControllerSupport.  For what you described, I do not
recommend making your actions subclass TilesAction because you would have
much more work than simply implementing a TilesController in your particular
template. See tiles controllers starting in section 5.2.1 of the Tiles
Advanced Features (link at bottom of this page:
http://struts.apache.org/userGuide/dev_tiles.html).

I'm sure you will get other interesting suggestions and opinions. :)

Regards,
David

-----Original Message-----
From: Tait, Allen [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 17, 2004 1:34 PM
To: 'Struts Users Mailing List'
Subject: Web Site vs Web Application


I'm interested in implementing the Struts and Tiles frameworks for a web
site (moving slowly toward web application).  Is it possible, or even
recommended to design something similar to the following for the static
portions of a web site.

Assume Tiles have been defined to provide a common site wrapper.  What's
left is to select the body (jsp or Tile).  Do this by defining a layout that
will provide the site wrapper and receive that content/body (page or Tile)
as a parameter.   Then a generic "action" could grab the page requested from
URL and put into common scope.  The layout would grab the requested page
name from the common scope and result in the requested page.

An approach like this seems to simplify the adding of new content pages by
eliminating configuration for tiles and struts.  It seems this would also
help when implementing a content management system that would simply add the
content (body) portion of these pages.  For example, once a body was added
to the site, a request for that page would be successful with no additional
configuration.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to