I can get a URI template in the form "/ a / b" or "/ a / {b}" to work. But when I try "/ a / b / {c}", I get an HTTP 404 and a log message in the form "There is no mapping found for the HTTP request with the URI [/ myapp / a / b / c ... ..." But I see this message in the log, and it makes me think that the comparisons are correct ...?
INFO: Mapped URL path [/a] onto handler 'AController' Nov 16, 2010 12:18:39 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler INFO: Mapped URL path [/a
I noticed all the examples from spring -mvc docs showing URI patterns in the form "/ a / {b}" or / a / {b} / c / {d} ". So" / a / b / {c} " not possible? Is there anything I need to configure in web.xml for this to happen? Or maybe (or mis) for this template not to show up? Currently my dispatcher servlet is mapped to:
<url-pattern>/</url-pattern>
The controller is as follows:
@Controller public class AController { @RequestMapping(value = "/a/b/{c}", method = RequestMethod.GET) public ModelAndView show() { ModelAndView modelAndView = new ModelAndView("A"); return modelAndView; } }
Accessing http: // localhost: 8080 / myapp / a / b / c returns 404, and I see this in the log:
Nov 16, 2010 12:19:06 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound WARNING: No mapping found for HTTP request with URI [/myapp/a/b/c] in DispatcherServlet with name 'dispatcher'
Any ideas on how I am drawing my URI pattern correctly?
Sajee source share