struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Siggelkow <bills...@bellsouth.net>
Subject Re: Module navigation
Date Thu, 08 Apr 2004 18:14:54 GMT
The "module" attribute is available on the html:link tag in Strut 1.2. 
One thing you could try would be using the "href" attribute with a 
relative URL.

<html:link href="../user/foo.do">Goto User Foo</html:link>

As you said, you could also use the SwitchAction.

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message