Spring MVC, Spring MVC Module Tutorial

In this section we will understand the Spring MVC module.


 

Ads

Tutorials   
Spring 4 Introduction and example Features of Spring Framework 5 How to make Spring web Login form? How to make Simple form in Spring web? Spring, Hibernate login and registration application Spring Framework Tutorial for beginners with examples Spring Framework for Apache Hadoop 2.3.0 GA released Spring Framework 4.1 GA is released with major features Why to use Spring Framework? Spring Framework 4.1 - First Release candidate available Spring IO Platform 1.0.0 Released Spring 4: Login Form using Spring MVC and Hibernate Example Spring 4 MVC Login form Example with source code Spring 4 MVC Hello World Example: Spring 4 MVC Tutorial will full source code Spring Web MVC Application Error:ClassNotFoundException: DispatcherServlet on deploying Features of Spring 4 Spring Framework 4.0 released Spring Framework 4: Spring Framework 4 Tutorials and Example Spring Integration 3.0 Release is released and available for download Spring Tutorial for Beginners Java Springs Framework Tutorial Spring Architecture Spring Framework Tutorials database spring registration form Spring Login Example Roseindia Spring Tutorial Spring Tutorial Spring 3.2 MVC insert and retrieve blob from the database The hidden tag The errors tag net.roseindia.dao net.roseindia.service net.roseindia.model net.roseindia.controller Spring 3.2 MVC Hibernate Example Spring 3.2 MVC, Upload File in a specific folder Spring 3.2 MVC Form Handling The textarea tag The options tag The option tag The select tag The radiobuttons tag The radiobutton tag The checkboxes tag mvc:default-servlet-handler Static Resources Configuration View Controllers Configuration View resolvers Spring 3.2 MVC Hello World Example Content Negotiation Configuration
Ads

Spring MVC - Spring MVC Introduction

    

In this example we will give you quick overview of Spring MVC Framework. The Spring MVC framework is the MVC stack for the development of web applications based Model View Controller (MVC) architecture.

What is MVC architecture?

The MVC or Model View Controller architecture is famous design pattern used in designing the applications. This design pattern separates the application into three parts called Model, View and Controller.

Model: Model is the business data or simple the data of the application.

View: View is the presentation part of the application such as data entry form, reports etc.

Controller: The controller component delegates between Model and view.

Spring MVC

The Spring Framework is light-weight container and it supports multiple frameworks and libraries. The Spring framework allows the developers to mix and match multiple frameworks while developing and deploying the applications. The Spring MVC takes the advantage of Spring framework and provides once to best and productive framework for development of web applications.

The Spring MVC is a web development framework based on the MVC (Model View Controller) design pattern. The features of Spring MVC framework are the Pluggable View technology and Injection of services into controllers. Let's see in detail:

Pluggable View technology

There are many view technologies such as JSP, Tiles, Velocity etc. Spring framework allows us to use these view technologies.

Injection of services into controllers

The IoC container provides the important functionality of the dependency injection. This helps the programmer to inject the dependency such as business service at runtime. This saves lot of code duplication and coding effort.

Spring's MVC components:

Model:

The class org.springframework.ui.ModelMap is used by the spring framework to hold the data. It wraps the business data into org.springframework.ui.ModelMap class and then pass it to the view.

View:

Framework provides pluggable view, and it allows the developers to create views using jsp, Velocity and Jasper templates. In Spring MVC Logical view and Model are represented in the object of the class org.springframework.web.servlet.ModelAndView.

Controller:

The controller is responsible for handling all the requests from the user and then process the user request. Here are the list of controllers available in the Spring 2.5 framework:

  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.

In the next sections we will see the examples of all these controllers.

Advertisements

Ads
Share on Google+Share on Google+

Spring MVC, Spring MVC Module Tutorial

Posted on: August 18, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Spring MVC, Spring MVC Module Tutorial  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:6
Samuel
June 12, 2013
LnVIXfwCsYaxjvYJVu

Your posintg is absolutely on the point!
Shiv Prakash
May 18, 2012
Its regarding the list of controllers of spring

You have mentioned duplicated controller in the controller list of spring.As per my understanding, duplicate controllers should not be there.
Priya
June 28, 2012
Pictorial representation

No doubt the tutorial is very nice but could be more clear if there would be pictorial representation showing the flow of, one after another. Thank you
ABC
July 12, 2012
Controller's repeated

11. AbstractController 12.AbstractCommandController 13.SimpleFormController 14.CancellableFormController This are again repeated
Zhea
June 15, 2013
HWDosbxTnefM

Thanks, I'd rather this be conmmuity wiki anyway. I don't think prefixing files that way makes much sense either, but I've seen it a lot. Apr 8 at 16:25
rajeswar reddy
May 7, 2013
spring

it's good i like it

Ads

 

Ads