Learning Spring MVC with six basic flow examples

Spring MVC uses a modified version of the Model 2 FrontController architecture.

Before we go into detail about how Spring MVC works, we will focus on creating a few simple web flows using Spring MVC.

In this section, we will create six typical web application flows using Spring MVC. The flows are listed as follows:

  • Flow 1: Controller without a View; serving content on its own
  • Flow 2: Controller with a View (a JSP)
  • Flow 3: Controller with a View and using ModelMap
  • Flow 4: Controller with a View and using ModelAndView
  • Flow 5: Controller for a simple form
  • Flow 6: Controller for a simple form with validation

We will discuss how to unit test these flows in a separate section at the end of this chapter.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset