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:
- Create a JSP view file called
collectCustomerInfo.jsp
under the directorysrc/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 theCustomer
domain object. You can find the complete code forcollectCustomerInfo.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=...