Consulting Training Blog Careers About Us Contact Us

Spring MVC Web Applications Training

Course ID: CC-117A
Duration: 5 Days

Upcoming Classes

Sorry, nothing scheduled right now. Click the Get Notified button below to be alerted when a class is scheduled.

Get Notified

On Site/Private

Can't find a class that fits right for you? Contact us to inquire about scheduling your own private class

Contact Us


This course enables the experienced Java developer to use the Spring application framework to manage objects in a lightweight, inversion-of-control container, and to build sophisticated web applications using the model/view/controller or MVC framework.

Students build web applications that use Spring MVC to organize their designs into coherent request/response cycles. They use Spring command objects to manage HTML forms and their data, and connect these to the validation framework. We connect our applications to persistent stores and study the DAO and ORM modules, to better understand JDBC and JPA persistence models and declarative transaction control. The course concludes with a chapter on Spring's testing framework, including the mock-MVC utilities for web controllers.

Bring This Course To You

For groups of 5 or more, let Intertech bring this course to your location. Customized versions tailored towards your objectives are also available.

Learn More

Learning Objectives

  • Build a web application as a Spring DispatcherServlet and associated application context
  • Use Spring MVC annotations to develop web controllers, mapping request URLs and other criteria to Java methods and binding request data to method parameters
  • Build and manage HTML forms with Spring command objects and custom tags
  • Customize input binding, validation, and error handling
  • Use Spring interceptors to implement horizontal features in the web application
  • Connect business objects to persistent stores using Spring's DAO and ORM modules
  • Simplify JDBC code using Spring templates
  • Integrate JPA entities and DAOs into Spring applications
  • Control transactions using Spring, either programmatically or declaratively
  • Develop effective unit tests using Spring's test framework and the MockMvc environment for web controllers


  • Understanding of Spring Core - Spring Framework Core is excellent preparation.
  • Basic knowledge of XML 

Course Outline

The Web Module

  • Servlets and JSPs: What's Missing
  • The MVC Pattern
  • The Front Controller Pattern
  • DispatcherServlet
  • A Request/Response Cycle
  • The Strategy Pattern
  • Web Application Contexts
  • Annotation-Based Handler Mappings
  • @Controller and @RequestMapping
  • "Creating" a Model
  • Views and View Resolvers

Handling Requests

  • Matching URLs
  • Identifying Views
  • Request Parameters
  • Injectable Parameters
  • Command Objects
  • Return Types
  • HTTP Methods
  • Path Variables
  • Scope and Granularity of Command Objects
  • Headers and Cookies
  • RESTful Web Services

Working with Forms

  • Form Processing in Spring MVC
  • Command Objects in Request Methods
  • Spring Custom Tags
  • <form:form> and Friends
  • Text Fields, Check Boxes, and Buttons
  • Radio Buttons and Select/Option Lists
  • Command objects at Session Scope
  • Limitations of @SessionAttributes

Data Binding

  • A Consolidated Process
  • Property Editors
  • DataBinder and @InitBinder Methods
  • Converters and Formatters
  • Using <mvc:annotation-driven/>
  • Custom Formatters


  • Validating Form Input
  • Spring Validators
  • Deriving a Validator Reference
  • Applying a Validator
  • <form:errors>
  • Bean Validation, a/k/a JSR-303
  • Configuring Bean-Validation Support
  • Automatic Support with @Valid

Configuring Spring MVC

  • Configuring Message Sources
  • Resolving Error Codes
  • Codes for Bean Validation
  • HandlerExceptionResolver
  • @ExceptionHandler
  • @ControllerAdvice for Global Error Handling


  • Interceptors
  • Configuring Interceptors
  • Filters in the Request-Handling Cycle

Persistence with JDBC

  • Reducing Code Complexity
  • The DataAccessException Hierarchy
  • JdbcTemplate
  • RowMapper<T> and ResultSetExtractor<T>
  • The DaoSupport Hierarchy
  • Capturing Generated Keys
  • Transaction Control
  • TransactionTemplate
  • Isolation Levels
  • Transaction Propagation

Persistence with JPA

  • Object/Relational Mapping
  • The Java Persistence API
  • JpaDaoSupport and JpaTemplate
  • @PersistenceUnit and @PersistenceContext
  • Shared Entity Managers
  • Using <tx:annotation-driven>
  • The @Transaction Annotation
  • Isolation and Propagation
  • A Limitation of @Transactional
  • Understanding Entity States
  • Bean Validation in JPA
  • Optimistic Locking


  • Testability of Spring Applications
  • Dependency Injection
  • Mocking
  • SpringJUnit4ClassRunner
  • TestContext
  • @ContextConfiguration
  • Preserving Test Isolation
  • @DirtiesContext
  • Mocking Spring MVC
  • Building Requests
  • Checking the ModelAndView
  • Profiles
  • Testing Persistence Components

Free Resources from Intertech

Free Tutorial: Spring Batch Admin

Free Book Chapter: Spring Web

Free Whitepaper: Spring 4 Generic Qualifiers