title: Error resolving template JSP program is trying to use Thymeleaf
body: <p>I am using the Spring MVC I have some issues when I am trying to execute my chart code.
  Precisely in my project are templates in html format but now I am obliged to use .jsp extension. </p>
  
  <p>My error :</p>
  
  <pre><code>2019-06-19 14:51:48.364 ERROR 14784 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Chart.jsp", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
  
  org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Chart.jsp", template might not exist or might not be accessible by any of the configured Template Resolvers
  </code></pre>
  
  <p>The most important code :</p>
  
  <pre><code>&lt;!-- chart.jsp--&gt;
  &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;script type="text/javascript"&gt;
  window.onload = function() {
  
  var dps = [[]];
  var chart = new CanvasJS.Chart("chartContainer", {
      animationEnabled: true,
      exportEnabled: true,
      title: {
          text: "Simple Column Chart with Index Labels"
      },
      data: [{
          type: "column", //change type to bar, line, area, pie, etc
          //indexLabel: "{y}", //Shows y value on all Data Points
          indexLabelFontColor: "#5A5757",
          dataPoints: dps[0]
      }]
  });
  
  var xValue;
  var yValue;
  var indexLabel;
  
  &lt;c:forEach items="${dataPointsList}" var="dataPoints" varStatus="loop"&gt;
      &lt;c:forEach items="${dataPoints}" var="dataPoint"&gt;
          xValue = parseInt("${dataPoint.x}");
          yValue = parseFloat("${dataPoint.y}");
          indexLabel = "${dataPoint.indexLabel}";
          dps[parseInt("${loop.index}")].push({
              x : xValue,
              y : yValue,
              indexLabel : indexLabel
          });
      &lt;/c:forEach&gt;
  &lt;/c:forEach&gt;
  
  chart.render();
  
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="chartContainer" style="height: 370px; width: 100%;"&gt;&lt;/div&gt;
      &lt;script src="https://canvasjs.com/assets/script/canvasjs.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Controller :</p>
  
  <pre><code>@Controller
  @RequestMapping("/canvasjschart")
  public class CanvasjsChartController {
  
      @Autowired
      private CanvasjsChartService canvasjsChartService;
  
      @RequestMapping(method = RequestMethod.GET)
      public String springMVC(ModelMap modelMap) {
          List&lt;List&lt;Map&lt;Object, Object&gt;&gt;&gt; canvasjsDataList = canvasjsChartService.getCanvasjsChartData();
          modelMap.addAttribute("dataPointsList", canvasjsDataList);
          return "Chart.jsp";
      }
  
  }
  </code></pre>
  
  <p>I'd like to add that other templates use thymeleaf. In this case I also can rewrite this into HTML, but I don't now how.</p>
  
  <p>Project structure :</p>
  
  <p><a href="https://i.stack.imgur.com/HIIH0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HIIH0.png" alt="enter image description here"></a></p>