aspose file tools*
The moose likes Struts and the fly likes Using Two tiles definition files in one configuration file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Using Two tiles definition files in one configuration file" Watch "Using Two tiles definition files in one configuration file" New topic
Author

Using Two tiles definition files in one configuration file

poornima balagopal
Ranch Hand

Joined: Dec 02, 2003
Posts: 83
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
Pramoda Bhat
Ranch Hand

Joined: Oct 17, 2003
Posts: 32
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>
James Holmes
Author
Ranch Hand

Joined: Jan 06, 2004
Posts: 64
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/
poornima balagopal
Ranch Hand

Joined: Dec 02, 2003
Posts: 83
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
 
Consider Paul's rocket mass heater.
 
subject: Using Two tiles definition files in one configuration file