3 Created on : 04.08.2015, 10:55:10
7 <%--<%@page errorPage="errorHandler.jsp" %>--%>
8 <%@page import="java.util.Iterator"%>
9 <%@page import="java.util.Map"%>
10 <%@page import="org.mxchange.jcore.contact.Gender"%>
11 <%@page import="org.mxchange.pizzaapplication.product.Product"%>
12 <%@page import="org.mxchange.pizzaapplication.application.PizzaApplication"%>
13 <%@page import="org.mxchange.pizzaapplication.application.PizzaServiceApplication"%>
14 <%@page import="org.mxchange.pizzaapplication.beans.CustomerBean" %>
15 <%@page contentType="text/html" pageEncoding="UTF-8"%>
18 // Init application instance
19 PizzaApplication app = PizzaServiceApplication.getInstance(application);
22 if ("POST".equals(request.getMethod())) { //NOI18N
23 // "Walk" through all products and unmark them as ordered
24 for (final Product product : app.getUnmarkedProducts(session)) {
25 // Is it choosen and amount set?
26 if (app.isProductChoosen(product, request, session)) {
27 // Then mark it as choosen
28 app.markProductAsChoosen(product, session);
31 // Redirect to proper URL
32 // @TODO Commented out for developing:
33 //response.sendRedirect(request.getContextPath() + "/finished.jsp");
35 <jsp:useBean id="customer" scope="session" class="org.mxchange.pizzaapplication.customer.bean.PizzaServiceCustomerBean" type="CustomerBean" />
36 <jsp:setProperty name="customer" property="*" />
37 <jsp:forward page="../preview.jsp" />
41 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
42 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
44 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
45 <link rel="stylesheet" href="<%=request.getContextPath()%>/style.css" type="text/css"/>
46 <title><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</title>
51 <h1><%=PizzaServiceApplication.MAIN_TITLE%> - Form-Handler</h1>
54 <jsp:include page="/static/menu.jsp" flush="true" />
56 <div id="content_outer">
57 <div id="content_title">
58 <h2>Bitte nicht direkt aufrufen:</h2>
62 Bitte rufen Sie diese Seite nicht direkt auf.