title: Spring MVC multiple @RequestMappings
body: <p>I am using UrlBasedViewResolver. My requirement is that two different URls talk to same controller and they should go to two different pages aka page1 or page2 based on the URL.
         These two pages have same model object, they are almost same except few minor UI changes. How can this be achieved neatly in Spring MVC.</p>
  
  <pre><code>@RequestMapping(value = {"/page1","/page2"}, method=RequestMethod.GET)
  public String displayPage(ModelMap map){
      // return to Page1 or Page2 accordingly wherever it came from  
  }
  
  @RequestMapping(value = {"/page1","/page2"}, method=RequestMethod.POST)
  public ModelAndView submitPage(@ModelAttribute("model") Model model){
      return new ModelAndView("page1 or page2", "command", model); 
  }
  </code></pre>