Spring MVC framework Introduction

This section provide you the brief introduction of Spring MVC framework and it's lifecycle.

Spring MVC framework Introduction

Spring MVC framework Introduction

This section provide you the brief introduction of Spring MVC framework and it's lifecycle.

Spring MVC is model-view-controller(MVC) based web framework. Spring MVC is the web component of the Spring framework. Spring MVC framework is highly configurable in terms of functionality and logic. Spring MVC framework integration with other framework like Struts, JSF, Tapestry etc is very easy. For rendering view JSP and Servlet is not the only option in Spring MVC framework, you can use other view technologies like Freemarker, Velocity, Excel or Pdf for providing view to the clients.

Spring MVC framework is request driven and designed around a central Servlet. This central Servlet sends requests, for processing, to suitable controller and it also render the render the view to the client with the help of  View Resolver object. The central Servlet in Spring MVC is DispatcherServlet which is fully integrated with Loc container, which give us freedom to use other features of Spring.

Given below the complete life cycle of Spring MVC (step by step):

Spring_mvc

  • First client made a request  in form of http request.

  • This request is caught by the Front controller (i.e. DispatcherServlet).

  • DispatcherServlet consults with suitable Handler Mapping to dispatch the request to suitable Controller.

  • Controller process the request, and returns model and view to the Front controller (i.e. DispatcherServlet).

  • The Front controller afterwards resolves the View with the help of View Resolver object and rendered  back to the client.

Tutorials

  1. Spring 3.2
  2. New Features of Spring Framework 3.2
  3. Spring MVC framework Introduction
  4. Special Bean Types of WebApplicationContext
  5. Spring MVC framework Features
  6. Processing Sequence of DispatcherServlet
  7. @Controller annotation for defining new controller
  8. @RequestMapping annotation for mapping requests
  9. Spring 3.2 Asynchronous Request Processing
  10. Defining handler methods using @RequestMapping annotation
  11. Requests Intercepting through a HandlerInterceptor
  12. View Resolving through ViewResolver interface
  13. Chaining of Multiple view resolvers
  14. Redirecting and forwarding to views
  15. ContentNegotiatingViewResolver
  16. Locales in Spring MVC
  17. Themes and Theme resolvers in Spring MVC
  18. Multipart support for file upload in Spring MVC
  19. @ExceptionHandler & @ResponseStatus annotation
  20. Customizing the Default Error Page
  21. Form Tag library configuration
  22. The form tag
  23. The input tag
  24. The password tag
  25. ControllerClassNameHandlerMapping class for handling convention mapping
  26. Modification in conventional ModelAndView
  27. Autogenerated logical view name through RequestToViewNameTranslator
  28. The checkbox tag
  29. Support for ETag
  30. Servlet container initialization through code
  31. MVC Java Config or the MVC XML Namespace
  32. Customizing the MVC Java config or XML Namespace
  33. Interceptors Configuration using Java or XML
  34. Content Negotiation Configuration
  35. Spring 3.2 MVC Hello World Example
  36. View resolvers
  37. View Controllers Configuration
  38. Static Resources Configuration
  39. mvc:default-servlet-handler
  40. The checkboxes tag