3 Created on : 04.08.2015, 10:55:47
8 <%@page errorPage="errorHandler.jsp" %>
10 <%@page contentType="text/html" pageEncoding="UTF-8"%>
12 <%@page import="java.util.Map"%>
13 <%@page import="java.util.Iterator"%>
14 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
15 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
16 <%@page import="org.mxchange.pizzaapplication.customer.Customer" %>
17 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
19 <jsp:useBean id="customer" scope="request" class="org.mxchange.pizzaapplication.customer.bean.CustomerBean" type="Customer" />
20 <jsp:setProperty name="customer" property="*" />
23 // Init application instance
24 PizzaApplication app = PizzaServiceApplication.getInstance(application);
26 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
27 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
29 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
30 <link rel="stylesheet" href="style.css" type="text/css"/>
31 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</title>
36 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Vielen Dank!</h1>
40 <jsp:include page="static/menu.jsp" flush="true" />
43 <div id="content_outer">
44 <div id="content_title">
45 <h2>Folgendes haben Sie bestellt:</h2>
50 <thead class="table_header">
52 <th class="table_header_column">
55 <th class="table_header_column">
58 <th class="table_header_column">
61 <th class="table_header_column">
64 <th class="table_header_column">
69 <tbody class="table_body">
71 // Get iterator from products
72 Iterator<Map.Entry<String, Product>> iterator = app.getProductsIterator();
75 while (iterator.hasNext()) {
77 Map.Entry<String, Product> entry = iterator.next();
80 Product product = entry.getValue();
82 // Mark product as ordered
83 app.markProductAsOrdered(product, session);
87 <%=app.getPrintableChoosenFromRequestSession(product, request, session)%>
90 <%=app.handleAmountFromRequestSession(product, request, session)%>
93 <%=product.getTitle()%>
96 <%=product.getPrice()%>
99 <%=app.getTotalPositionPriceFromRequestSession(product, request, session)%>
104 float totalPrice = app.calculateTotalPrice(request, session);
107 <td id="table_total_amount_left">
110 <td id="table_total_amount_right">
111 <%=app.calculateTotalAmount(request, session)%>
116 <td id="table_total_sum_left">
119 <td id="table_total_sum_right">
125 <td colspan="5" class="table_footer">
127 if (("POST".equals(request.getMethod())) && (app.calculateTotalAmount(request, session) > 0)) {
128 out.print("Ihre Bestellung ist eingegangen.");
129 synchronized(session) {
130 //session.invalidate();
134 out.print("Keine Bestellung aufgegeben.");