Here's how the URL mapping works:
- web.xml routes urls with a prefix to some servlet, and you have mapped everything with prefix /rest/ to the spring DispatcherServlet.
- The controller routing is handled by the parameter to the
@Controller
annotation, which you've annotated with/coffee
- Then there's a variable at the end that is the name of the coffee, which gets placed in the
@PathVariable
.
So nowhere in there do I see /MVCXML/
. mkyong.com didn't provide a web.xml so it's a little unclear what the prefix is supposed to be, if you don't already know how web.xml and Spring's dispatcher servlet work together.
The correct URI should be http://localhost:8080/rest/coffee/arabic
.