Improve your coding skills from beginner to expert with the largest online Java e-learning platform

Spring MVC and WebFlow

featuring Session Handling, Validation with JSR 303, PDF and Excel Views, Ajax and WebFlow
  • By the end of this Spring MVC Training course, you will be able to work on professional standard Spring-MVC projects.
  • Starting from a basic Spring system with just a console and test harness, we build up a web application front end and demonstrate the major concepts in Spring-MVC.
  • The final three chapters cover the related topic of WebFlow. We explain when it should be used (and when not), and as always we build a full working system together, from scratch.
  • All software needed is provided (except for an IDE - any will do).
  • Note that this course covers Spring-MVC 2.5, 3.x and 4.x, the legacy method of writing controllers in Spring-MVC 1 and 2 is only mentioned briefly.


You will need at least basic knowledge in fundamental Spring (dependency injection and configuring the Spring XML). You can get this by following our standard Spring Training Course.

We also assume you are familiar with Java - writing classes, creating objects and the basic Java syntax.

Some HTML knowledge will be useful and a little background research might be needed if you are new to HTML.

Contents - contains over 8 hours of video - equivalent to 3 days of live training.


Having problems? check the errata for this course.



6 m 31 s
A quick overview of the course.


Getting Started

26 m 19 s
We configure your development environment and Tomcat. In case you need a review of plain MVC, we give a quick overview. You may not need this chapter if you have already done web development and are familiar with MVC.


Spring MVC Controllers

36 m 10 s
We now write our first Spring-MVC controller. We'll see how to configure the "DispatcherServlet" and what the @RequestMapping annotation is.


Automatic Controller Scanning

10 m 52 s
Although the controller we previous wrote works, many projects use an alternative approach which reduces the amount of XML you need. In this short chapter we show how this works.


Parameters and Sessions

43 m 15 s
We now see how to pass parameters from a web page to a controller, and then how to handle sessions.


Form Handling

33 m 0 s
We'll now add a more complex form and we'll see how to "bind" an object to the form.



38 m 50 s
The most important aspect of Forms is how to check they are valid before you process them. Here, we add "manual validation" to your form.


Declarative Validation (JSR-303)

35 m 20 s
An alternative to manual validation is "declarative validation", covered by a Java standard called JSR-303.


Alternative Views

27 m 35 s
As well as JSP, Spring-MVC supports a range of different views. Here we look at PDF and Excel spreadsheets.


View Resolvers

28 m 47 s
Many projects use View Resolvers with Spring-MVC - these remove hardcoding from your controllers. We'll add two view resolvers to our code and see the benefit.


Ajax and JSON

43 m 14 s
We give a full overview of Ajax in case you're new to it. Then we see how a simple annotation is used to make a Spring controller work with an Ajax client.


WebFlow - Getting Started

44 m 23 s
WebFlow is an add-on to Spring-MVC. We'll see when it should be used, and then go through the configuration steps.


WebFlow - Complex Flows

48 m 31 s
Now we're set up, we'll see how to write a professional standard flow using a very expression XML description.


WebFlow - Going Further

51 m 43 s
We need another chapter to complete our WebFlow knowledge! We'll see how the back button and refresh buttons work, and what Flash Scope is.


Where to go Next

9 m 52 s
We've aimed to get you to a professional standard in Spring-MVC and WebFlow. We can't quite cover everything, so we now describe your next steps. We also briefly cover the legacy Spring-MVC controllers.


Bonus Chapter - MVC JavaConfig

47 m 34 s
After the course was released, it became very popular to use JavaConfig instead of XML for configuration. We have a separate module available on JavaConfig, but we thought it only fair to add the MVC section of the course to here. The project used on the course is different, but all of the concepts should apply. The chapter assumes you've already learnt JavaConfig - you can find details of this in the Spring Fundamentals course, or our separate JavaConfig module.

Let the Course Come to You

About Us Pricing Frequently Asked Questions Contact Privacy T&Cs Affiliates and Resellers
Facebook Twitter YouTube LinkedIn