Using jsp:setProperty
<% int numItemsOrdered = 1; try { numItemsOrdered = Integer.parseInt(request.getParameter("numItems")); } catch(NumberFormatException nfe) {} %> <% double discountCode = 1.0; try { String discountString = request.getParameter("discountCode"); discountCode = Double.parseDouble(discountString); } catch(NumberFormatException nfe) {} %>
Item IDUnit PriceNumber OrderedTotal Price
$ $