title: Request mapping in Spring MVC
body: <p>I have a little problem with my app in Spring MVC. I want to edit users data in my app. So I have edit controller which has listWorkers, redirectWorker and editWorker method.</p>
  
  <pre><code>@RequestMapping("/print")
  public String listWorkers(Model model)
  {
      model.addAttribute("workerList", workerService.getAllWorkers());
      return "print";
  }
  
  @RequestMapping("/edit")
  public String redirectWorker(HttpServletRequest request)
  {
      String parameter = request.getParameter("workers");
      String path = "redirect:/edit/" + parameter;
      return path;
  }
  
      @RequestMapping("/edit/{worker}")
  public String editWorker(@PathVariable("worker")
  String login, Model model)
  {
      model.addAttribute("worker", workerService.getWorker(login));
      return "edition";
  }
  </code></pre>
  
  <p>I have a problem with resources and images folders. When I'm using for example, print method everything is good but when I try to use editWorker method my logo and css files are not loading. I have a request mapping for this folders in servlet-context file:</p>
  
  <pre><code>&lt;resources mapping="/resources/**" location="/resources/" /&gt;
  &lt;resources mapping="/images/**" location="/images/" /&gt;
  </code></pre>
  
  <p>When I'm using print method I have URL like this:</p>
  
  <pre><code>http://localhost:8080/WWP/print
  </code></pre>
  
  <p>and I can see image and style.
  But when I'm using edit method on my specific user I have URL like this:</p>
  
  <pre><code>http://localhost:8080/WWP/edit/caro
  </code></pre>
  
  <p>And in this way I can't see image and style. I have a warn:</p>
  
  <pre><code>WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/WWP/edit/resources/images/logo.png] in DispatcherServlet with name 'appServlet'
  WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/WWP/edit/resources/styles/menu.css] in DispatcherServlet with name 'appServlet'
  </code></pre>
  
  <p>I have images and styles catalogues in resource folder which is directly in webapp folder (cause I'm using maven). It works earlier, but when I have something like <code>/*/*</code> it doesn't work. I suppose that something is wrong with resurces mapping in my servlet-context file.</p>
  
  <p>I' m loading my css and image file like this:</p>
  
  <pre><code>&lt;img src="resources/images/logo.png"&gt;
  &lt;link rel="stylesheet" href="resources/styles/menu.css" type="text/css"&gt;&lt;/link&gt;
  </code></pre>
  
  <p>Thanks in advance for your help.</p>