title: Spring boot, JSP file as view not loading when run in IntelliJ
body: <p>I've created a simple Spring Boot Web Application in intelliJ. I've placed a simple .jsp file in the /src/main/resources/templates/ folder which contains some basic HTML.</p>
  
  <p>I'm trying to return this in a controller but I'm getting this error;</p>
  
  <pre><code>This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Fri Sep 09 10:37:46 BST 2016
  There was an unexpected error (type=Not Found, status=404).
  No message available
  </code></pre>
  
  <p>I'm assuming that Spring is unable to find the .jsp file, but there's no other errors appearing in the console to give me any further information.</p>
  
  <p>Here's my simple controller;</p>
  
  <pre><code>@Controller
  @RequestMapping("/test")
  public class TestController {
  
      @RequestMapping("")
      public ModelAndView index() {
          return new ModelAndView("test");
      }
  
  }
  </code></pre>
  
  <p>I've included the following in my application.properties file;</p>
  
  <pre><code>spring.mvc.view.prefix = /templates/
  spring.mvc.view.suffix = .jsp
  </code></pre>
  
  <p>My POM file includes the following dependencies;</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-jersey&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;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&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;javax.servlet&lt;/groupId&gt;
              &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>I'm using Spring Boot with embedded tomcat.</p>
  
  <p>I've tried changing the path to the views inside application.properties to;
  classpath:/templates/ but that also didn't make any difference.</p>
  
  <p>Finally, here is the structure of my project;</p>
  
  <p><a href="https://i.stack.imgur.com/03i2a.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/03i2a.jpg" alt="Project File Structure"></a></p>
  
  <p>When running the application, I'm just using the 'Run' option in IntelliJ.</p>