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"); // In JDK 1.1 use Double.valueOf(discountString).doubleValue() discountCode = Double.parseDouble(discountString); } catch(NumberFormatException nfe) {} %>
Item IDUnit PriceNumber OrderedTotal Price
$ $