title: Context Root mapping and Spring MVC
body: <p>I have 2 Controllers which are redirected to the same jsp. </p>
  
  <pre><code>//Controller1
  @Controller
  @RequestMapping("/user")
  public class UserController {
      @RequestMapping(method=RequestMethod.GET)
      public String defaultPage(Model model){
           return "home";
      }
  }
  
  //Controller2
  @Controller
  @RequestMapping("/")
  public class HomeController {
      @RequestMapping(method=RequestMethod.GET)
      public String HomePage(Model model){
           return "home";
      }
  }    
  </code></pre>
  
  <p>now on "home" view page, I have below script. </p>
  
  <pre><code>&lt;script type="text/javascript" src="resources/js/myTutorModule.js"&gt;     
  &lt;/script&gt;
  </code></pre>
  
  <p>This line is rendered as below in browser..
  controller 1
  localhost:8080/myApp/user/resources/js/myTutorModule.js</p>
  
  <p>controller 2
  localhost:8080/myApp/resources/js/myTutorModule.js</p>
  
  <p>So only the 2nd one is working. Is there a way to handle this with out using JSP context root(I am planning to use angular JS and want to use html - no JSPs ). Any suggestions.</p>