struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Miller <>
Subject Re: Module navigation
Date Thu, 08 Apr 2004 18:14:35 GMT
I was faced with something similar in my last project - while the app 
was split into multiple modules (13, to be exact,) there were several 
things that I needed to be truly global, like various forwards, and 
certain resource bundles.

I found a solution to this problem by defining the global forwards and 
resources in a common configuration file, then using that common 
configuration in each module (in addition to the module specific configs.)

Basically, if you comma separate config files in the module config 
param, struts will load each in turn and use them as the configuration 
for the module.  It looks something like this:


I used the global forwards defined in the common file for all cross 
module navigation.  Made things somewhat simpler, and kept everything in 
one place.


Marian Schedenig wrote:

> In our Struts-/Tile-based web application, we have troubles navigating between 
> modules. A simplified scenario looks like this:
> Default module - Portal page, login,...
> Module "users" - User management
> Module "admin" - Administration & settings
> ...
> All pages are based on one basic Tiles definition, which also includes a menu 
> bar for navigating between the various parts of the application. Therefore, 
> we need a way to have links in the menu JSP which work from any of our 
> modules.
> Right now, we use simple "a href" HTML tags, but since they require that we 
> specify the complete path relative to our server (including the webapp name), 
> this is not a permanent solution.
> Another possibility seems to be using a SwitchAction, but this action would 
> have to be defined in each module's struts config. I'd prefer a solution 
> where we don't have to duplicate this kind of data, as I fear it could 
> quickly lead to inconsistencies.
> According to the online documentation for the HTML taglib, the "link" tag 
> should have a "modules" attribute that would allow us to specify the module 
> for each link in the link itself. However, none of the HTML taglib versions I 
> tried (and I downloaded the latest stable/official version) seem to know this 
> attribute ("module" cannot be found in the entire TLD).
> So my question is: Is there a simple way to specify module-independent (i.e. 
> independent from the *current* module) way to use the same JSP with the same 
> links from several modules?
> And a related problem: Is it possible to make the non-default modules aware of 
> the Global Forwards and Exceptions specified in the default module? As with 
> the SwitchAction, I would like to avoid duplicating this kind of data for all 
> our modules.
> Thanks in advance,
> Marian.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message