3 Created on : 04.08.2015, 10:55:47
7 <%@page import="org.mxchange.pizzaservice.application.PizzaApplication"%>
8 <%@page import="org.mxchange.pizzaservice.application.PizzaServiceApplication"%>
9 <%@page errorPage="errorHandler.jsp" %>
10 <%@page import="java.util.Map"%>
11 <%@page import="java.util.Iterator"%>
12 <%@page import="org.mxchange.pizzaservice.product.Product"%>
13 <%@page contentType="text/html" pageEncoding="UTF-8"%>
16 // Init service instance
17 PizzaApplication service = PizzaServiceApplication.getInstance(application);
19 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
22 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
23 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</title>
28 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
33 <li><a href="index.jsp" title="Eingangsseite">Home</a></li>
34 <li><a href="order.jsp" title="Bestellseite">Bestellung</a></li>
35 <li><a href="finished.jsp" title="Bestellung abgeschlossen">Vielen Dank</a></li>
36 <li><a href="bye.jsp" title="Sitzung beennden">Sitzung beenden</a></li>
40 <div id="content_outer">
41 <div id="content_title">
42 <h2>Folgendes haben Sie bestellt:</h2>
47 <thead class="table_header">
49 <th class="table_header_column">
52 <th class="table_header_column">
55 <th class="table_header_column">
58 <th class="table_header_column">
61 <th class="table_header_column">
66 <tbody class="table_body">
68 // Get iterator from products
69 Iterator<Map.Entry<String, Product>> iterator = service.getProductsIterator();
72 while (iterator.hasNext()) {
74 Map.Entry<String, Product> entry = iterator.next();
77 Product product = entry.getValue();
79 // Mark product as ordered
80 service.markProductAsOrdered(product, session);
84 <%=service.getPrintableChoosenFromRequestSession(product, request, session)%>
87 <%=service.handleAmountFromRequestSession(product, request, session)%>
90 <%=product.getTitle()%>
93 <%=product.getPrice()%>
96 <%=service.getTotalPositionPriceFromRequestSession(product, request, session)%>
101 float totalPrice = service.calculateTotalPrice(request, session);
104 <td id="table_total_amount_left">
107 <td id="table_total_amount_right">
108 <%=service.calculateTotalAmount(request, session)%>
113 <td id="table_total_sum_left">
116 <td id="table_total_sum_right">
122 <td colspan="5" class="table_footer">
124 if (("POST".equals(request.getMethod())) && (service.calculateTotalAmount(request, session) > 0)) {
125 out.print("Ihre Bestellung ist eingegangen.");
126 synchronized(session) {
127 session.invalidate();
131 out.print("Keine Bestellung aufgegeben.");