Controllers in Spring MVC:-
Spring provides many types of controllers.This can be both good and bad.The good
thing is that you have a variety of controllers to choose from, but that also
happens to be the bad part because it can be a bit confusing at first about
which one to use. The best way to decide which controller type to use probably
is by knowing what type of functionality you need.
The DispatcherServlet delegates the request to the controllers to execute the functionality specific part of it. There are many abstract controllers available in this framework which support specific tasks. Each abstract controller provides a method to be overridden by the controllers.
2 ParameterizableViewController: Specifies view name to return WebApplicationContext.
3 UrlFilenameViewController: Inspects URL, retrieves file name of the file request and uses that as a view name.
4 MultiActionController: Handles multiple requests and needs MethodNameResolver or ParameterMethodNameResolver to work with. One method represents one action in this controller.
5 AbstractCommandController: Populates command object with request parameters available in controller. Offers validation features but does not offer form functionality.
6 AbstractFormController: Models forms using command objects, validates command object, and makes those available in controller. Just that id does not support the view determination.
7 SimpleFormController: It does everything that the AbstractFormController does and in addition to that it supports the view identification and redirection.
8 AbstractWizardController: It is to be used for Wizard kind of screen group, features required in a wizard functionality (validate, process start, process finish, etc.) are supported by this controller.