title: How to define a path for Tiles configurer?
body: <p>My Spring application can not start because the path of the tiles.xml file that was working fine until now can not be reached. I can deploy it locally, but when I create a .war to upload it to the server it gives me the error.</p>
  
  <p>Can anybody tell how much path should I define not to crash on this error when I am deploying the application?
  (And why).</p>
  
  <p>This is my qualified name is... path: /VotaIdeas/src/main/webapp/WEB-INF/tiles.xml</p>
  
  <blockquote>
    <p>2018-01-25 09:43:26.015 ERROR 2587 --- [-nio-80-exec-77] o.s.boot.SpringApplication<br>
      : Application startup failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tilesCon
    figurer' defined in com.caveofprogramming.App: Invocation of init method failed; nested exceptio
    n is java.lang.IllegalArgumentException: No URL for ServletContext resource [<strong>/WEB-INF/tiles.xml</strong>]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initiali
    zeBean(AbstractAutowireCapableBeanFactory.java:1578) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELE
    ASE]
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreate
    Bean(AbstractAutowireCapableBeanFactory.java:545) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE
    ]</p>
  </blockquote>
  
  <p>... and here is the tiles configurer in App.java:</p>
  
  <pre><code>@Bean
  public TilesConfigurer tilesConfigurer() {
      TilesConfigurer tilesConfigurer = new TilesConfigurer();
  
      String[] defs = {"/WEB-INF/tiles.xml"};
  
      tilesConfigurer.setDefinitions(defs);
  
      return tilesConfigurer;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/idnR8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/idnR8.png" alt="Files structure"></a></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.3.5.RELEASE&lt;/version&gt;
  &lt;/parent&gt;
  
  
  &lt;properties&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;tiles.version&gt;3.0.5&lt;/tiles.version&gt;
  &lt;/properties&gt;
  
  &lt;groupId&gt;com.caveofprogramming&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-tutorial&lt;/artifactId&gt;
  &lt;version&gt;1.0&lt;/version&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tomcat.embed&lt;/groupId&gt;
          &lt;artifactId&gt;tomcat-embed-jasper&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt;
          &lt;artifactId&gt;tiles-core&lt;/artifactId&gt;
          &lt;version&gt;${tiles.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.apache.tiles&lt;/groupId&gt;
          &lt;artifactId&gt;tiles-jsp&lt;/artifactId&gt;
          &lt;version&gt;${tiles.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-security&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-taglibs&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.googlecode.owasp-java-html-sanitizer&lt;/groupId&gt;
          &lt;artifactId&gt;owasp-java-html-sanitizer&lt;/artifactId&gt;
          &lt;version&gt;20160628.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.security&lt;/groupId&gt;
          &lt;artifactId&gt;spring-security-test&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-thymeleaf&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.postgresql&lt;/groupId&gt;
          &lt;artifactId&gt;postgresql&lt;/artifactId&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;true&lt;/executable&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/0DekY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0DekY.png" alt=".war file"></a></p>
  
  <p><a href="https://i.stack.imgur.com/pK39R.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pK39R.png" alt="left works, right does not work"></a></p>
  
  <p><a href="https://i.stack.imgur.com/gUcSs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gUcSs.png" alt="Web Deployment Assembly"></a></p>