I'm trying to create a WebApp with 2 sections.

Section1 consists of Struts Actions managed by an ActionServlet and using Tiles for 
consistent layout. The incoming requests will always be '*.do'.

Section2 is a bunch of generated html fragments (each is a page's worth) that I would 
like to embed in the Tiles I'm already using in Section1. Ie Request for html page 
comes in and it is forwarded to the Tile page which embeds the originally requested 
page. The incoming requests will always be 'foo/<htmlpagename>.html'

I thought I had it nailed. 

Attempt1: Have the request for Section2 be handled by its own ActionServlet, with a 
very simple custom RequestProcessor. But Struts only allows a single instance of 
ActionServlet (or subclass) within a WebApp.

Atempt2: Use a single ActionServlet and either use a separate Module for each section, 
or use a wildcard ActionMapping to catch all of Section2's html requests. But Struts 
only allows a single servlet-mapping element for the controller-servlet and I would 
need 2 (*.do and foo/*.html). NB further Struts restriction is that when using Modules 
you can only use extension paths in your servlet-mappings.


Attempt3: ??? I'm looking for ideas.
At the moment the only solution I can see is to implement my own Servlet (not an 
ActionServlet subclass) which then uses the Tiles config and mechanism to render the 
Section2 response with the required layout.

Is there a better way?

thanks in advance.

William

Reply via email to