title: Using multiple Struts2 namespaces with tiles
body: <p>I want to add namespaces in my struts2 configuration and I use tiles.</p>
  
  <p>A package of my struts.xml for example :</p>
  
  <pre><code>&lt;package name="search" namespace="/search" extends="struts-default"&gt; 
  &lt;result-types&gt;
      &lt;result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" /&gt;
  &lt;/result-types&gt;
  &lt;action name="SearchActionInit"  class="web.action.SearchAction" method="initSearch"&gt; 
     &lt;result name="input" type="tiles"&gt;search&lt;/result&gt; 
     &lt;result name="success" type="tiles"&gt;search&lt;/result&gt; 
  &lt;/action&gt; 
  &lt;/package&gt;
  </code></pre>
  
  <p>And the corresponding tiles configuration :</p>
  
  <pre><code>&lt;definition name="baseLayout"    template="layout.jsp"&gt;
      &lt;put-attribute name="titre"               value="titre.default" /&gt;
      &lt;put-attribute name="header"            value="/common/header.jsp" /&gt;
      &lt;put-attribute name="menu"          value="/common/menu.jsp" /&gt;
      &lt;put-attribute name="leftcontent"          value="/common/leftcontent.jsp" /&gt;
      &lt;put-attribute name="rightcontent"          value="/common/rightcontent.jsp" /&gt;
      &lt;put-attribute name="detail"          value="/common/detail.jsp" /&gt;
      &lt;put-attribute name="footer"               value="/common/footer.jsp" /&gt;
  &lt;/definition&gt;
  
  &lt;definition name="search"    extends="baseLayout"&gt;
      &lt;put-attribute name="titre"               value="titre.search" /&gt;
      &lt;put-attribute name="rightcontent"          value="/pages/search/Search.jsp" /&gt;
  &lt;/definition&gt;
  </code></pre>
  
  <p>The problem I have is that I need to duplicate the layout.jsp in a search folder for the namespace search (and so on for the other namespaces). It's not in the tiles logic and will bring more effort to maintain.</p>
  
  <p>Has anybody a key to this problem to avoid duplication?</p>