title: Spring boot: 404 error when calling JSP using controller
body: <p>I'm getting the following error when running my project using Spring Tool Suite,</p>
  
  <p><a href="https://i.stack.imgur.com/wlL89.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/wlL89.jpg" alt="enter image description here"></a></p>
  
  <p>But in case my problem is I have already added the appropriate dependencies to <code>pom.XML</code> file. So what could be the problem?</p>
  
  <p>My <code>pom.XML</code> file dependencies as follows,</p>
  
  <pre><code>        &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-tomcat&lt;/artifactId&gt;
              &lt;version&gt;2.1.3.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>My controller <code>ApplicationController.java</code> as follows,</p>
  
  <pre><code>package com.example.demo.controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  @Controller
  public class ApplicationController {
  
      @RequestMapping("/")
      public String Welcome() {
          return "welcomepage";
      }
  }
  </code></pre>
  
  <p>My vives are in <code>src/main/webapp/WEB-INF/view/welcomepage.jsp</code> you can look the tree view below,</p>
  
  <p><a href="https://i.stack.imgur.com/SkHJF.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/SkHJF.jpg" alt="enter image description here"></a></p>
  
  <p>And I have already changed the <code>application.properties</code> file as well. But still, I can't understand what is wrong.</p>
  
  <p>My <code>application.properties</code> file as follows,</p>
  
  <pre><code>spring.mvc.view.prefix=/WEB-INF/view/
  spring.mvc.view.suffix=.jsp
  </code></pre>
  
  <p>I just print hello in My <code>welcomepage.jsp</code>,</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  hello
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>