Okay, I found a way to do what I wanted, but not as cleaning as I'd have liked. Here's what I did.

First, I created Tiles definition file for each module in the application. Then in one of the module's Struts configuration file I put in the TilesPlugin definition and listed each module's Tiles definition file. In my case I put this in the Struts config associated with the default struts module (that one defined simply as config/ in the web.xml). Then I defined each additional module's Struts configuration file in the web.xml like normal. In each module's Struts config file I defined the Tiles request processor as the controller but not the TilesPlugin.

This seems to work just fine. It's not as flexible as I'd like but it does the job.

Lajoie Chad wrote:

I'm having an issue getting Tiles to work with Struts 1.1 in a modular application setup. Here is what I'm trying to do. In each module I want a module specific Tiles definition file and a global definitions file. In each module the Struts config file for that module has something like the following Tiles plugin configuration:

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-def/global.xml, /WEB-INF/tiles-def/sysadmin.xml"/>
<set-property property="definitions-debug" value="2"/>
<set-property property="definitions-parser-validate" value="true" />
<set-property property="moduleAware" value="true" />
</plug-in>


What I expected to see is that as Struts configured each module it would read the plugin definition and load the global Tiles file and then load the module specific one. Thus each module would have access to it's page definitions but no other ones (unless they were in the global.xml file).

Instead, what I am seeing is that only the Tiles files listed in the TilesPlugin configuration of the first module Struts configures gets used in every module. Thus all the other modules can't find their page definitions.

Can I do what I want and if so what I am missing to make this work?


------------------------------------------------------------------------

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

-- Chad La Joie Booz | Allen | Hamilton (703) 377-1300

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

Reply via email to