Developing a Spring Framework MVC application step-by-step

Recommending the following tutorials on Spring MVC:
  1. Spring MVC using Eclipse
  2. Spring MVC using NetBeans 
 #2 is same as #1 except for the use NetBeans.

Some thoughts:

The way they set up the  message bundle is confusing: in the section "Add the Message Bundle", it says to add message.properties into WEB-INF/classes folder. Well, of course, it works that way. But in a real project, you won't be adding stuff in the classes directory. It should be deployed there. So just put the message.properties in your source package or a resource folder, and let the build script copy into the classes directory.
Spring MVC supports 4 kinds of handler mapping:
  1. BeanNameUrlHandlerMapping
  2. SimpleUrlHandlerMapping
  3. CommonsPathMapHandlerMapping
  4. ControllerClassNameHandlerMapping

By default, if no handler mapping is registered in the application context file, Spring
Dispatcher Servlet will use #1, i.e. BeanNameURLHandlerMapping. The above 2 tutorials are actually using the default BeanNameUrlHandlerMapping created by the dispatcher servlet.

No comments: