Final Confirmation

The code for the final conformation (given in Listing 12.10) itself is a duplicate of the shopping cart page, with the following changes:

  • The quantity is always static rather than a fill-in value.

  • Now that the application knows where it's being shipped to, you can have it add tax and shipping to the totals.

  • The form submits to the credit card authorization page.

Listing 12.10. finalConfirm.jsp
 <%@ include file="/jsp/cust/AutoLogin.jsp" %> <%@ page import="com.bfg.product.Product" %> <%@ page import="java.util.Iterator" %> <%@ page import="com.bfg.cart.CartItem" %> <jsp:useBean id="orderaddr" class="com.bfg.customer.Address" scope="session"/> <jsp:useBean id="ordercredit" class="com.bfg.customer.CreditCard" scope="session"/> ...

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.