title: JHipster webTemplateResolver looking for /WEB-INF/templates/error.html jar contains /WEB-INF/classes/templates/error.html
body: <p>I have just built my app using the latest version of generator-jhipster. Things were great until I made some changes, causing the server to want to generate an error page. Unfortunately the out-of-the-box configuration does not resolve the error.html template:</p>
  
  <pre><code>@Bean
  @Description("Thymeleaf template resolver serving HTML 5")
  public ServletContextTemplateResolver webTemplateResolver() {
      ServletContextTemplateResolver webTemplateResolver = new ServletContextTemplateResolver();
      webTemplateResolver.setPrefix("/WEB-INF/templates/");
      webTemplateResolver.setSuffix(".html");
      webTemplateResolver.setTemplateMode("HTML5");
      webTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
      webTemplateResolver.setOrder(2);
      return webTemplateResolver;
  }
  </code></pre>
  
  <p>When deployed to tomcat, I get an endless list of error messages...
  Exception processing template "error": Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers</p>
  
  <p>Does this work for others?
  If not, should the Thymeleaf templates be generated in the src/main/webapp/WEB-INF/ directory to overcome this problem? Alternatively, should a different ViewResolver configuration be used?</p>
  
  <p>By changing the above to this, actually solved the problem...</p>
  
  <pre><code> public ITemplateResolver webTemplateResolver() {
          ClassLoaderTemplateResolver webTemplateResolver = new ClassLoaderTemplateResolver();
          webTemplateResolver.setPrefix("templates/");
          webTemplateResolver.setSuffix(".html");
          webTemplateResolver.setTemplateMode("HTML5");
          webTemplateResolver.setCharacterEncoding(CharEncoding.UTF_8);
          webTemplateResolver.setOrder(2);
          return webTemplateResolver;
      }
  </code></pre>
  
  <p>So the only question remains is whether this change should be pushed into JHipster and if so how to?</p>