!!! Listing 1 <%-- choice.jsp --%> <%-- Setting up an error page --%> <%@ page errorPage="/jspTutorial/errorpage.htm" %> <%-- import needed java classes --%> <%@ page import="java.util.*" %> <%@ page import="de.ix.jspTutorial.model.Pizza" %> <%@ page import="de.ix.jspTutorial.model.PizzaList" %> <%@ page import="de.ix.jspTutorial.model.Ingredient" %> <%@ page import="de.ix.jspTutorial.model.IngredientList" %> !!! Listing2 <%! public String formatCurrency(double aCurrencyValue) { DecimalFormat theFormat = new DecimalFormat(); theFormat.setGroupingUsed(true); theFormat.setMinimumFractionDigits(2); theFormat.setMaximumFractionDigits(2); return theFormat.format(aCurrency) ; } %> !!! Listing 3 <% Set entrySet = pizzaList.getPizzas().entrySet(); for (Iterator iter = entrySet.iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry)iter.next(); Pizza pizza = (Pizza)entry.getValue(); %> <% } %>
 Name  Größe  Preis  
 <%=pizza.getName()%>  <%=pizza.getSize()%>  DM <%=pizza.getBasePrice()%>
!!! Listing 4 <% Set entrySet = pizzaList.getPizzas().entrySet(); for (Iterator iter = entrySet.iterator(); iter.hasNext();) { Map.Entry entry = (Map.Entry)iter.next(); Pizza pizza = (Pizza)entry.getValue(); %>  <%=pizza.getName()%>  <%=pizza.getSize()%>  DM <%=pizza.getBasePrice()%> <% } %> !!! Listing 5 Pizza Service online - confirm /!-- [...] --> Die Bestellung wird an folgende Adresse geliefert:

 Lieferadresse