title: o.s.web.servlet.PageNotFound - No mapping for GET /WEB-INF/views/welcome.jsp
body: <p><strong><em>Please write reasons before down vote or put on hold the question or something else...</em></strong></p>
  
  <p>I have created simple spring-boot application but for some reason the view can't be mapped and I am getting the following error:</p>
  
  <pre><code>o.s.web.servlet.PageNotFound - No mapping for GET /WEB-INF/views/welcome.jsp
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BdRiI.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BdRiI.png" alt="enter image description here"></a></p>
  
  <p>Problem arises after this statement:</p>
  
  <pre><code>return "welcome";
  </code></pre>
  
  <p>this is <strong><code>pom.xml</code></strong> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;groupId&gt;com.example&lt;/groupId&gt;
      &lt;artifactId&gt;demo&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;demo&lt;/name&gt;
      &lt;description&gt;Demo project for Spring Boot&lt;/description&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;2.1.1.RELEASE&lt;/version&gt;
          &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter&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;scope&gt;test&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;/dependencies&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;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>My folder structure looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/pZ1II.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pZ1II.png" alt="enter image description here"></a></p>
  
  <p>This is <code>WelcomeController</code>:</p>
  
  <pre><code>package com.example.demo.Controller;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RequestMapping;
  
  @Controller
  @RequestMapping("/")
  public class WelcomeController {
  
      @GetMapping("/")
      public String welcome(){
  
          return "welcome";
  
      }
  
  }
  </code></pre>
  
  <p>This is <code>application.properties</code>:</p>
  
  <pre><code>spring.mvc.view.prefix=/WEB-INF/views/
  spring.mvc.view.suffix=.jsp
  spring.mvc.static-path-pattern=/resources/**
  server.port=8089
  </code></pre>
  
  <p>This is <code>DemoApplication</code> class:</p>
  
  <pre><code>package com.example.demo;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  public class DemoApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(DemoApplication.class, args);
      }
  }
  </code></pre>
  
  <p>This is <code>welcome.jsp</code> file:</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          this is welcome page
          this is welcome page
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/sCUvs.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/sCUvs.gif" alt="enter image description here"></a></p>