Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Spring Spring MVC Controller hierarchy

 
 

Share on Google+Share on Google+

Spring MVC Controller hierarchy

Advertisement
This section describes the hierarchy of Spring MVC Module.

Spring MVC Controllers - Controllers hierarchy in Spring MVC

    

Controllers hierarchy in Spring MVC

In this we will will understand the controllers hierarchy in Spring MVC Module. The Spring MVC module provides a lot of flexibility to easily develop MVC based web applications. It provides many controllers that can be used to achieve different jobs.

Spring MVC module is based on the MVC design pattern. The main components involved are DispatcherServlet, Controller and Views. In Spring MVC DispatcherServlet plays very important role. It handles the user request and delegates it with Controller. Following diagram shows the very simplified architecture:

In this Spring MVC, DispatcherServlet works as the controller and it delegates the request to the Controller. Developers extends the abstract controller provided by the framework and writes the business logic there. The actual business related processing is done in the Controller.

 Spring MVC provides many abstract controllers, which is designed for specific tasks. Here is the list of anstract controllers that comes with the Spring MVC module:

  1. SimpleFormController
  2. AbstractController
  3. AbstractCommandController
  4. CancellableFormController
  5. AbstractCommandController
  6. MultiActionController
  7. ParameterizableViewController
  8. ServletForwardingController
  9. ServletWrappingController
  10. UrlFilenameViewController
  11. AbstractController
  12. AbstractCommandController
  13. SimpleFormController
  14. CancellableFormController.

Following diagram shows the Controllers hierarchy in Spring MVC:

Spring MVC Controller hierarchy

In the next sections we will be learning about all these controllers. We will also provide you the examples codes illustrating the usage of these controllers.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: August 19, 2010

Related Tutorials

Discuss: Spring MVC Controller hierarchy  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:2
Raja
September 2, 2012
i want elaborate spring mvc control flow

super ,not bad.
suraj kumar gupta
August 13, 2013
Controllers

in which condition i can use different types of Spring MVC controllers and describe all the types of controllers in details.
DMCA.com