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 – creating views for every view state


We have done everything to roll out our checkout flow, but one last thing is pending, that is, creating all the views that need to be used in the view states of our checkout flow. In total, we have six view states in our flow definition (collectCustomerInfo, collectShippingDetail, orderConfirmation, InvalidCartWarning, thankCustomer, and cancelCheckout), so we need to create six JSP files. Let's create all of them:

  1. Create a JSP view file called collectCustomerInfo.jsp under the directory src/main/webapp/WEB-INF/flows/checkout/, and add the following code snippet into it and save it. In the following code snippet, I have skipped the <input> tags for some of the fields of the Customer domain object. You can find the complete code for collectCustomerInfo.jsp in the code bundle of this book, which can be downloaded from www.packtpub.com/support. Consider the following code snippet:

    <%@ taglib prefix="c" uri="http://java.sun.com/jsp...