O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Buying More Than One Thing at Once

Buying a single item is relatively straightforward because you can handle it directly from the URL. But the client wants the customer to be able to purchase several items at the same time.

Listing 10.7 shows a section of Category.jsp rewritten to let the customer buy a quantity of multiple books. It replaces the current product display loop.

Listing 10.7. Category.jsp Revisited
 <FORM METHOD="POST" ACTION="buyit.jsp" TARGET="tempwindow"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4" height="253"> <tr> <th width="38%" height="23" align="left">Title</th> <th width="23%" height="23" align="left">Author</th> <th width="11%" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required