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>
32 <jsp:include page="static/menu.jsp" flush="true" />
35 <div id="content_outer">
36 <div id="content_title">
37 <h2>Folgendes haben Sie bestellt:</h2>
42 <thead class="table_header">
44 <th class="table_header_column">
47 <th class="table_header_column">
50 <th class="table_header_column">
53 <th class="table_header_column">
56 <th class="table_header_column">
61 <tbody class="table_body">
63 // Get iterator from products
64 Iterator<Map.Entry<String, Product>> iterator = service.getProductsIterator();
67 while (iterator.hasNext()) {
69 Map.Entry<String, Product> entry = iterator.next();
72 Product product = entry.getValue();
74 // Mark product as ordered
75 service.markProductAsOrdered(product, session);
79 <%=service.getPrintableChoosenFromRequestSession(product, request, session)%>
82 <%=service.handleAmountFromRequestSession(product, request, session)%>
85 <%=product.getTitle()%>
88 <%=product.getPrice()%>
91 <%=service.getTotalPositionPriceFromRequestSession(product, request, session)%>
96 float totalPrice = service.calculateTotalPrice(request, session);
99 <td id="table_total_amount_left">
102 <td id="table_total_amount_right">
103 <%=service.calculateTotalAmount(request, session)%>
108 <td id="table_total_sum_left">
111 <td id="table_total_sum_right">
117 <td colspan="5" class="table_footer">
119 if (("POST".equals(request.getMethod())) && (service.calculateTotalAmount(request, session) > 0)) {
120 out.print("Ihre Bestellung ist eingegangen.");
121 synchronized(session) {
122 session.invalidate();
126 out.print("Keine Bestellung aufgegeben.");