title: Web.servlet.PageNotFound - No mapping for GET
body: <p>I'm learnig how Spring boot + MVC works. I can display a message on the screen, but I can not modifying the style. The js e css file don't map with Spring.</p>
  
  <pre><code>2020-04-17 14:38:29.169  WARN 9552 --- [nio-8080-exec-3] o.s.web.servlet.PageNotFound             : No mapping for GET /js/main.js
  2020-04-17 14:38:29.169  WARN 9552 --- [nio-8080-exec-2] o.s.web.servlet.PageNotFound             : No mapping for GET /css/main.css
  </code></pre>
  
  <pre><code>import org.springframework.stereotype.Controller;
  import org.springframework.ui.Model;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestParam;
  
  @Controller
  public class HelloController {
  
       @GetMapping("/")
          public String index() {
              return "index";
          }
  
          @PostMapping("/hello") 
          public String sayhello(@RequestParam("name") String name, Model model) {
              model.addAttribute("name", name);
              return "hello";
          }
  
          @GetMapping({"/helloworld", "/helloname"})
          public String hello(Model model, @RequestParam(value="name", required=false, defaultValue="WORLD") String name) {
              model.addAttribute("name", name);
              return "helloname";
          }
  }
  </code></pre>
  
  <p>I've tryied to modify the path in the application.properties, but it didn't change anything.</p>
  
  <pre><code>spring.mvc.view.prefix = /WEB-INF/view/
  spring.mvc.view.suffix = .jsp
  spring.mvc.static-path-pattern = /resources/**
  
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/d6FvU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d6FvU.png" alt="enter image description here"></a></p>
  
  <p>This is my jsp page. When I run this page , I get the  error message, that I've posted before </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%&gt;
  &lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  
  &lt;link rel="stylesheet" type="text/css"
   href="webjars/bootstrap/3.3.7/css/bootstrap.min.css" /&gt;
  &lt;c:url value="/css/main.css" var="jstlCss" /&gt;
  &lt;link href="${jstlCss}" rel="stylesheet" /&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
   &lt;div class="container"&gt;
    &lt;header&gt;
     &lt;h1&gt;Spring MVC + JSP + JPA + Spring Boot 2&lt;/h1&gt;
    &lt;/header&gt;
    &lt;div class="starter-template"&gt;
     &lt;h1&gt;Users List&lt;/h1&gt;
     &lt;table
      class="table table-striped table-hover table-condensed table-bordered"&gt;
      &lt;tr&gt;
       &lt;th&gt;Date&lt;/th&gt;
       &lt;th&gt;Device&lt;/th&gt;
     &lt;!--   &lt;th&gt;Amount&lt;/th&gt;
       &lt;th&gt;OEE&lt;/th&gt; --&gt;
      &lt;/tr&gt;
      &lt;c:forEach items="${OEE}" var="oee"&gt;
       &lt;tr&gt;
        &lt;!-- &lt;td&gt;${oee.oeeID.date}&lt;/td&gt;
          &lt;td&gt;${oee.oeeID.device}&lt;/td&gt; --&gt;
          &lt;td&gt;${oee.amount}&lt;/td&gt;
          &lt;td&gt;${oee.oee}&lt;/td&gt;
       &lt;/tr&gt;
      &lt;/c:forEach&gt;
     &lt;/table&gt;
    &lt;/div&gt;
  
   &lt;/div&gt;
  
   &lt;script type="text/javascript"
    src="webjars/bootstrap/3.3.7/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>