struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suman Maity <maity_suma...@yahoo.com>
Subject Struts module switch
Date Tue, 10 Apr 2007 10:41:33 GMT

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.
-- 
View this message in context: http://www.nabble.com/Struts-module-switch-tf3552250.html#a9917277
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message