struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <>
Subject Re: Struts module switch
Date Tue, 10 Apr 2007 12:03:49 GMT
Have you considered removing the use of modules? Modules are really a 
nuisance, and were originally developed to allow multiple Struts "apps" 
running under one context. There's a hard barrier between modules and 
almost all developers I know no longer use them. You can split up your 
struts config without using modules.

I know this advice doesn't answer your question, but think about it, 
because it will save you time.


Suman Maity wrote:
> Hi,
>    I was trying struts module switching and was successful doing it using
> SwitchAction. I am also using tiles. The problem is I am not able to use a
> separate tiles definition file for the other module (i have two modules).  
> I have two struts config files. struts-config.xml for the default module and
> struts-anotherModule-config.xml for the other module.
> I have written the following in the default struts config file
> (struts-config.xml):
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
>   		<set-property property="definitions-config"
> value="/WEB-INF/conf/tiles-defs.xml"/>
>   		<set-property property="definitions-debug" value="1"/>
>   		<set-property property="definitions-parser-details" value="0"/>
>   		<set-property property="definitions-parser-validate" value="true"/>
> 	</plug-in>
> I had created another tiles definition file for the other module with a name
> tiles-anotherModule-defs.xml and created some definitions in that. 
> I mentioned this file in struts-anotherModule-config.xml file in the same
> way as above. In this struts config i wrote a action mapiping which has
> forward tag like this: <forward name="switchModule" path="actionExamples">
> The definition of actionExamples is there in the second tiles definition
> file that is the tiles-anotherModule-defs.xml file.
> When I run the app, the module switch occurs with the help of SwitchAction
> but finally it fails to load the definition actionExamples saying "Can not
> get request dispatcher for path actionExamples". 
> Now, the irony is that instead of specifying a seperate tiles definition
> file, I write the following line in struts-anotherModule-config.xml file:
> <plug-in className="org.apache.struts.tiles.TilesPlugin"/>
> Put the definition actionExamples in the default tiles def file and it
> works. I even don't need to mention the tiles def file's name here although
> it simply works. But if i comment the above line, it does not work. I am
> confused.
> Can not I use separate tiles definition files for separate modules each
> having its own struts config file?
> Please provide example  if possible.
> Thanking in advance.

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

View raw message