title: Error resolving template "pages", template might not exist or might not be accessible by any of the configured Template Resolvers
body: <p>I did a project using Spring with Thymeleaf and Tiles with the following structure :<br/><br>
  <img src="https://i.stack.imgur.com/KsBaX.jpg" alt="enter image description here"></p>
  
  <p>I have configured my Spring-Servlet :</p>
  
  <pre><code>&lt;bean id="templateResolver" 
                  class="org.thymeleaf.templateresolver.ServletContextTemplateResolver"&gt;
                  &lt;property name="prefix" value="/WEB-INF/templates/" /&gt;
                  &lt;property name="suffix" value=".html" /&gt;
                  &lt;property name="characterEncoding" value="UTF-8" /&gt;
                  &lt;property name="templateMode" value="HTML5" /&gt;
          &lt;/bean&gt;
  
          &lt;bean id="tilesConfigurer" 
                  class="org.thymeleaf.extras.tiles2.spring4.web.configurer.ThymeleafTilesConfigurer"&gt;
                  &lt;property name="definitions"&gt;
                          &lt;list&gt;
                                  &lt;value&gt;/WEB-INF/tiles-defs.xml&lt;/value&gt;
                          &lt;/list&gt;
                  &lt;/property&gt;
          &lt;/bean&gt;
          &lt;bean id="tilesViewResolver" class="org.thymeleaf.spring4.view.ThymeleafViewResolver"&gt;
                  &lt;property name="viewClass" 
                          value="org.thymeleaf.extras.tiles2.spring4.web.view.ThymeleafTilesView" /&gt;
                  &lt;property name="templateEngine" ref="templateEngine" /&gt;
                  &lt;property name="characterEncoding" value="UTF-8" /&gt;
          &lt;/bean&gt;
          &lt;bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine"&gt;
                  &lt;property name="templateResolver" ref="templateResolver" /&gt;
                  &lt;property name="additionalDialects"&gt;
                          &lt;set&gt;
                                  &lt;bean class="org.thymeleaf.extras.tiles2.dialect.TilesDialect" /&gt;
                          &lt;/set&gt;
                  &lt;/property&gt;
          &lt;/bean&gt;  
  </code></pre>
  
  <p>my Tiles Definition is :  </p>
  
  <pre><code>&lt;tiles-definitions&gt;
      &lt;definition name="layout" template="layout"&gt;
          &lt;put-attribute name="header"   value="header" /&gt;
          &lt;put-attribute name="menu"   value="menu" /&gt;
          &lt;put-attribute name="footer" value="footer" /&gt;
          &lt;put-attribute name="body" /&gt;
  
      &lt;/definition&gt;
  
      &lt;definition name="usersView" extends="layout"&gt;
          &lt;put-attribute name="body"   value="pages :: users" /&gt;
      &lt;/definition&gt;
   &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>will this give me the following error :</p>
  
  <pre><code>Error resolving template "pages", template might not exist or might not be accessible by any of the configured Template Resolvers 
  </code></pre>
  
  <p>but when i move the users.html page to the templates folder and make my tiles def as  </p>
  
  <pre><code>&lt;definition name="usersView" extends="layout"&gt;
          &lt;put-attribute name="body"   value="users" /&gt;
      &lt;/definition&gt;
  </code></pre>
  
  <p>its working fine .  </p>
  
  <p><strong>So the Question is can Thymeleaf accept My Folder Structure? if Yes ,How?</strong></p>