• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using Two tiles definition files in one configuration file

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Author
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic