[Logo]
Forums Register Login
Using Two tiles definition files in one configuration file
Hi,
I have two configuration file. I have plugged these two in the struts-config.xml as
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs-crms.xml"/>
<set-property property="definitions-config" value="/WEB-INF/tiles-defs-embargo.xml"/>
<set-property property="moduleAware" value="true"/>
<set-property property="definitions-parser-validate" value="false"/>
</plug-in>
When i give like this only the second file is reading. When i gave two files as two plug in then also only the first one is reading.
so how can i solve this
Please help me
try this in your struts-config.xml
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml,
/WEB-INF/tiles-tests-defs.xml" />
<set-property property="definitions-parser-validate" value="true" />
<set-property property="moduleAware" value="true" />
</plug-in>
Hi Poorima,
To use multiple files with the TIles plugin you have specify a comma-delimited list for the "definitions-config" parameter, as shown next.
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs-crms.xml,
/WEB-INF/tiles-defs-embargo.xml"/>
<set-property property="moduleAware" value="true"/>
<set-property property="definitions-parser-validate" value="false"/>
</plug-in>
Hope that helps,
-James
http://www.jamesholmes.com/struts/
Hi,
Thank you to both of you. Its working fine.
I have one more doubt. If i have one default configuration file and two other module specified file(examples configuration 1 and 2 files). And correpsonding to these three i have three tiles-def.xml file , tiles-defs.xml, tiles-defs1.xml and tiles-defs2.xml . I want to know can i specify the default tiles-defs.xml file in my default configuration file and other two in the correponding module's configuration files.
Because when i tried this way it was not working. I had to give the name of those two tiles files in the default configuration file as you told and again i had to give the plug in in the corresponding module specified configuration file
thank you once again
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Dec 15, 2017 14:58:06.