title: Spring 3 MVC Nesting RequestMapping
body: <p>From Spring Official Document, Spring 3 MVC look to be support nesting Request Mapping.
  <a href="http://static.springsource.org/spring/docs/3.0.0.RELEASE/spring-framework-reference/pdf/spring-framework-reference.pdf" rel="noreferrer">http://static.springsource.org/spring/docs/3.0.0.RELEASE/spring-framework-reference/pdf/spring-framework-reference.pdf</a>
  In page 448, they mentioned:</p>
  
  <pre><code>@Controller
  @RequestMapping("/appointments")
  public class AppointmentsController {
  //...
      @RequestMapping(value="/new", method = RequestMethod.GET)
      public AppointmentForm getNewForm() {
          return new AppointmentForm();
      }
  //...
  }
  </code></pre>
  
  <p>(I have eliminated some code for readability)
  In such case, they claimed that a request to <code>/appoinments/new</code> will invoke the <code>getNewForm</code> method.
  However, it doesn't work with my local Google App Engine server (though GAE server works just fine with mapping that are not nested).
  I create an example controller like below:</p>
  
  <pre><code>@Controller
  @RequestMapping("/basic.do")
  public class HelloWorldController {
      @RequestMapping(value="/hello", method=RequestMethod.GET)
      public ModelAndView helloWorld() {
          ModelAndView mav = new ModelAndView();
          mav.setViewName("basic/helloWorld");
          mav.addObject("message", "Hello World From Phuong!");
          return mav;
      }
  }
  </code></pre>
  
  <p>but a request to <code>/basic.do/hello</code> always results in 404 error.</p>
  
  <p>Wonder if anything wrong there?
  I'm using annotation-driven mode with <code>*.do</code> request handled by spring <code>DispatchServlet</code>.</p>