Spring 3.2.0, path variables, url-patterns for dispatcher servlet question
I've been reading through the Pro Spring MVC with WebFlow book and it uses a Servlet 3.0 container and maps a dispatcher servlet with a mapping of *.htm. Later, they change this to / (which I didn't notice). I was trying to run a page that expected to see /book/detail/#, where the number was the book's pk. The problem was, my URL was formed as /book/detail.htm/#, and this was not being handled by the dispatcher.
I guess my questions are:
1. In order to use these path variables, are we required to map the dispatcher to / ?
2. If we map it to /, then all resources go through the dispatcher. Is that the reasoning then for adding a resource handler in the configuration, i.e.
Code:
@Override
public void addResourceHandlers(final ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/**/*").addResourceLocations("classpath:/META-INF/web-resources/");
}
Just trying to get a handle on how these requests should be mapped. The real issue for me with this book is that it is based on Servlet 3.0 and I have a Servlet 2.5 Production environment, which appears that they touch on, briefly at page 539 (deploying to Tomcat 6/Cloud Foundry).
Thanks for any and all feedback.