The Checkout Process

The checkout process for our movie store example requires us to display the contents of our cart and the display the total cost for the contents of the cart. Since we have been using the movies listing servlet (MoviesChooser) to list the contents of our cart, it would be convenient to use this same code in the checkout process. The only thing we would have to add to the output would be the total cost items on the bottom of the checkout page. Unfortunately, we use XSL to produce the output for the movies listing page and the XSL template script language does not have the capability to compute totals. The best way for us to obtain the totals is to create a JavaBean to provide this information, which we do with the CartTotalsBean ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software 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.