Search code examples
struts2tiles2apache-tiles

multiple tiles-def xml files


I'm using Struts 2.2.1 and tiles 2.1.4.

Wanted to know if there is a way to have multiple tiles-def xml files as my tiles-def xml file is becoming really big.


Solution

  • Not sure but i believe you need to pass param to Tiles listener in web.xml something like

    <context-param id="struts_tiles">
     <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
     <param-value>/WEB-INF/classes/file1.xml,/WEB-INF/classes/file2.xml</param-value>
    </context-param>
    

    Code above is not tested :)