Complete Spring Framework 4 Web MVC


Duration Two Days


Duration: 2 Days


It could be argued that the Spring Framework has impacted Java and the open source community more than any other framework – ever.  It is often referred to as a “defacto-standard” in the Java and Java EE development community.  In this class, students learn Spring Web MVC application development.  Spring Web MVC is Spring’s Model 2 framework for developing Web applications.

Learning Objectives

  •  Learn how to download, setup and configure the Spring Web MVC modules.
  •  Understand how to assemble a Web application with Spring Web MVC controllers, view resolvers, view, etc.
  •  Examine Spring Web MVC’s annotations for mapping Web requests.
  •  Explore Spring Web MVC’s tag library for Web input forms and displays.
  •  Learn how Spring Web   MVC can easily render Excel spreadsheets, PDF documents and other non-HTML output.


This class is designed for Java Web application programmers with a need to understand Spring Framework’s support for Web development.  


Students should have a good understanding of the Java programming language and the Spring Framework core API and container.  A basic understanding of Web development is very helpful.  Students that have attended the Complete Spring Framework 4 class have the necessary background for this course.

Course Outline

Introducing Spring Web MVC

  •  Java Web Applications
  •  Spring Web MVC Architecture
  •  Spring Web MVC Hello World

Spring Web MVC Configuration

  •  Context Configuration Location
  •  Context Loader
  •  More View Resolvers
  •  BeanNameViewResolver
  •  XmlViewResolver
  •  Multiple View Resolvers

MVC Controllers

  •  Stereotype Controllers
  •  Request Mapping by Annotation
  •  Path Variables
  •  @RequestParam
  •  Request/Response Annotations
  •  Handler Method Parameters
  •  Handler Method Return Types
  •  Redirect/Forwards
  •  Command Beans and Working with HTML Forms
  •  BindingResult and Errors
  •  @InitBinder
  •  @ModelAttribute
  •  @SessionAttributes
  •  Exception Handling
  •  Asynchronous Request Processing


  •  Validator
  •  JSR-303 Validation

Spring Web MVC Views

  •  Spring Web MVC View
  •  Spring Form Tag Library
  •  Bind Form Data
  •  Externalized Messages
  •  Error Messages
  •  Non-template Views
  •  Excel View
  •  PDF View


  •  Formatting Annotations
  •  Custom Formatting
  •  Formatting SPI

Appendix A – Spring Web Flow

  •  Web Flow
  •  What are Flows?
  •  Web Flow Setup
  •  Defining Flows
  •  View Events
  •  Variables
  •  Actions
  •  Action and Decision States
  •  Validation
  •  More with Web Flow

Appendix B – Spring Security

  •  Spring Security
  •  Getting and Configuring Spring Security
  •  Web/HTTP Security – Security Filter Chain
  •  Namespace Web Security Configuration
  •  Java Configuration Web Security Configuration
  •  Alternate Authentication Providers
  •  Method Security

Appendix C – Spring Web MVC Testing

  •  Spring MVC Test Framework
  •  Test Setup
  • Creating Controller Tests