title: Why does spring resolve views only when one level url path present on controller request mapping annotation
body: <p>I am implementing a website with Spring MVC and I've noticed the following problem. I have a controller like this one </p>
  
  <pre><code>/**
   * Created by adelin.ghanayem@cayetanogaming.com on 4/7/15.
   */
  @Controller
  @RequestMapping(value = "/")
  public class UserControlPanelController {
  
      // this url has a second level. /user/panel
      @RequestMapping(value = "/user/panel",method = RequestMethod.GET)
      @Secured(value = {"ROLE_USER"})
      public ModelAndView mainPage(){
           return new ModelAndView("user-panel.jsp");
      }
  }
  </code></pre>
  
  <p>The view user-panel.jsp is not resolver I receive </p>
  
  <pre><code>HTTP ERROR 404
  
  Problem accessing /myapp/user/login-user.jsp. Reason:
  
      /myapp/user/login-user.jsp
  </code></pre>
  
  <p>However, when I map the method to <code>@RequestMapping(value = "/user",method = RequestMethod.GET)</code></p>
  
  <p>The view is resolved. The jsp page is placed at the root of the webapp (web directory ) </p>
  
  <p>Now when I tried to map the method to <code>@RequestMapping(value = "/user/panel",method = RequestMethod.GET)</code> and <code>return new ModelAndView("/user-panel.jsp");</code> NOTE THE ROOT SLASH. The view resolved properly. </p>