A shopping cart in our case is a list of books and a respective quantity (always 1). If necessary, customers must log in after registering before they may use the shopping cart. Once the order process is complete, the shopping cart is deleted. For us, the shop ends at this point; we have removed the shopkeeper from the process!
The shopping cart is only accessible to registered customers, so we need a link to the login form. If an incorrect e-mail and password combination is supplied, an error message is displayed; otherwise we greet the customer by name.
It makes sense to use the now-familiar form procedure. We already have a customer bean, forms, and
Action classes. As we will see shortly, using them as they ...