Book Image

Spring MVC Beginner's Guide

By : Amuthan Ganeshan
Book Image

Spring MVC Beginner's Guide

By: Amuthan Ganeshan

Overview of this book

Table of Contents (19 chapters)
Spring MVC Beginner's Guide
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Time for action – implementing the checkout flow


We will now add Spring Web Flow support to our project and define the checkout flow for our shopping cart. Consider the following steps:

  1. Open pom.xml; you will find pom.xml under the root directory of the project.

  2. You will be able to see some tabs at the bottom of the pom.xml file. Select the Dependencies tab and click on the Add button in the Dependencies section.

  3. A Select Dependency window will appear; enter Group Id as org.springframework.webflow, Artifact Id as spring-webflow, Version as 2.3.3.RELEASE, select Scope as compile, and click on the OK button and save pom.xml.

  4. Create a directory structure, flows/checkout/, under the directory src/main/webapp/WEB-INF/ and create an XML file called checkout-flow.xml. Then, add the following content into it and save it:

    <?xml version="1.0" encoding="UTF-8"?>
    <flow xmlns="http://www.springframework.org/schema/webflow"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation=...