top of page

Why SpringMVc?

  • Spring Mvc is a sub-framework of spring framework which is used to build applications.

  • it is built on top of the servelet API.

  • it follows the model-view-controller design pattern.

  • it is implemented all the basic features of a core spring framework like an inversion of control, and dependency injection.

  • rapid application development.

  • spring MVC is Flexible.



3

  • Model - A model contains the data of the application. Data can be a single object or a collection of objects.

  • Controller - A controller contains the business logic of an application. Here, the @Controller annotation is used to mark the class as the controller.

  • View - A view represents the provided information in a particular format. So, we can create a view page by using view technologies like JSP+JSTL, Apache Velocity, Thymeleaf, and FreeMarker.

What is the flow of Spring MVC?




  • Once the request has been generated, it is intercepted by the DispatcherServlet that works as the front controller.

  • The DispatcherServlet gets an entry of handler mapping from the XML file and forwards the request to the controller.

  • The controller returns an object of ModelAndView.

  • The DispatcherServlet checks the entry of the view resolver in the XML file and invokes the specified view component.

spring MVC creation step

1. Configure the dispatcher servlet in web.xml


2. Create Spring Configuration File


3. Configure View Resolver


4. Create Controller


5. Create a View to show(page)

 
 
 

Recent Posts

See All

Comments


MiIT Logo

Company

Contact Us

+1905-487-4880 

5160 Explorer Dr #34, Mississauga,ON L4W 4T7

+1929-743-3199

4466 Buttonwood Ln Lilburn, GA 30047

262 Chapman Rd, STE 240 Newark DE 19702

+44 20 4525 1214

71-75 Shelton Street, Covent Garden, London, United Kingdom WC2H 9JQ

Stay up to date on the latest from MiIT

  • Instagram
  • Facebook
  • http://linkedin.com/company/miittechnologies/about/
  • Whatsapp

© All Content MiIT Technologies Inc.2019 - 2025. All rights reserved.

bottom of page