Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
218
Chapter 9 Session Tracking
Listing 9.5 OrderPage.java (continued)
// Put number ordered in textfield that user
// can change, with "Update Order" button next
// to it, which resubmits to this same page
// but specifying a different number of items.
for(int i=0; i
order = (ItemOrder)itemsOrdered.elementAt(i);
out.println
("\n" +
" " + order.getItemID() + "\n" +
" " + order.getShortDescription() + "\n" +
" " +
formatter.format(order.getUnitCost()) + "\n" +
" " +
"
"
" VALUE=\"" + order.getItemID() + "\">\n" +
"
" SIZE=3 VALUE=\"" +
order.getNumItems() + "\">\n" +
"\n" +
"
" VALUE=\"Update Order\">\n" +
"\n" +
"\n" +
" " +
formatter.format(order.getTotalCost()));
}
String checkoutURL =
response.encodeURL("/Checkout.html");
// "Proceed to Checkout" button below table
out.println
("\n" +
"
"\n" +
"
" VALUE=\"Proceed to Checkout\">\n" +
"");
}
out.println(" | | | | |