Finalizing the Order

With the promotion, tax, and shipping building blocks in place, you can create a checkout page to capture the shipping address and credit card information and then display a final confirmation page that can include the shipping and tax. To begin, you need to create a JSP that combines the previously written address book and wallet functionality.

A good start in building this page is to see what the finished product will look like (see Figure 12.2). This will serve as a good roadmap to the underlying code.

Figure 12.2. The order information page.

Things are a bit trickier than with NewAddress or NewCreditCard because you need ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.