SHARE
TWEET

Untitled

a guest Sep 21st, 2016 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.     <jsp:root
  3.      xmlns:jsp="http://java.sun.com/JSP/Page"
  4.      xmlns:c="http://java.sun.com/jsp/jstl/core"
  5.      xmlns:fn="http://java.sun.com/jsp/jstl/functions"
  6.      xmlns:eshop="urn:jsptld:/WEB-INF/tlds/eshop.tld"
  7.      version="2.1"
  8.      >
  9.     <jsp:directive.page
  10.      language="java"
  11.      contentType="application/xhtml+xml;charset=UTF-8"
  12.      />
  13. <jsp:output omit-xml-declaration="false"/>
  14. <jsp:output
  15.   doctype-root-element="html"
  16.   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
  17.   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
  18.   />
  19. <c:url var="cssUrl" value="/css/eshop.jspx"/>
  20.  
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <head>
  23.   <title>Check Out</title>
  24.   <link rel="stylesheet" href="${cssUrl}" type="text/css"/>
  25.   </head>
  26. <body>
  27. <jsp:include page="TopMenu.jspx" flush="true"/>
  28. <jsp:include page="LeftMenu.jspx" flush="true"/>
  29. <div class="content">
  30.   <h2>CheckOut</h2>
  31.   <c:choose>
  32.     <c:when test="${fn:length(shoppingCart) > 0}">
  33.       <form action="">
  34.         <input type="hidden" name="action" value="orderConfirmation"/>
  35.         <table class="checkout">
  36.           <tr>
  37.             <th colspan="2">Delivery Details</th>
  38.             </tr>
  39.           <tr>
  40.             <td>Contact Name:</td>
  41.             <td><input type="text" name="contactName"/></td>
  42.             </tr>
  43.           <tr>
  44.             <td>Delivery Address:</td>
  45.             <td><input type="text" name="deliveryAddress"/></td>
  46.             </tr>
  47.           <tr>
  48.             <th colspan="2">Credit Card Details</th>
  49.             </tr>
  50.           <tr>
  51.             <td>Name on Credit Card:</td>
  52.             <td><input type="text" name="ccName"/></td>
  53.             </tr>
  54.           <tr>
  55.             <td>Credit Card Number:</td>
  56.             <td><input type="text" name="ccNumber"/></td>
  57.             </tr>
  58.           <tr>
  59.             <td>Credit Card Expiry Date:</td>
  60.             <td><input type="text" name="ccExpiryDate"/></td>
  61.             </tr>
  62.           <tr>
  63.             <td></td>
  64.             <td><input type="submit" value="Confirm Order"/></td>
  65.             </tr>
  66.           </table>
  67.         </form>
  68.       </c:when>
  69.     <c:otherwise>
  70.       <p class="error">ERROR: You can't check out an empty shopping cart!</p>
  71.       </c:otherwise>
  72.     </c:choose>
  73.   </div>
  74. </body>
  75. </html>
  76. </jsp:root>
  77.    
  78. <?xml version="1.0" encoding="UTF-8"?>
  79. <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  80.     xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
  81.     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee;http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
  82.     id="WebApp_ID" version="2.5">
  83.  
  84.  
  85.     <display-name>eshop</display-name>
  86.     <servlet>
  87.         <description>
  88.         </description>
  89.         <display-name>ShopServlet</display-name>
  90.         <servlet-name>ShopServlet</servlet-name>
  91.         <servlet-class>eshop.ShopServlet</servlet-class>
  92.         <init-param>
  93.             <param-name>base</param-name>
  94.             <param-value>/shop</param-value>
  95.         </init-param>
  96.         <init-param>
  97.             <param-name>imageURL</param-name>
  98.             <param-value>/images/</param-value>
  99.         </init-param>
  100.         <init-param>
  101.             <param-name>jdbcDriver</param-name>
  102.             <param-value>com.mysql.jdbc.Driver</param-value>
  103.         </init-param>
  104.         <init-param>
  105.             <param-name>dbURL</param-name>
  106.             <param-value>jdbc:mysql://localhost:3306/shop</param-value>
  107.         </init-param>
  108.         <init-param>
  109.             <param-name>dbUserName</param-name>
  110.             <param-value>root</param-value>
  111.         </init-param>
  112.         <init-param>
  113.             <param-name>dbPassword</param-name>
  114.             <param-value></param-value>
  115.         </init-param>
  116.     </servlet>
  117.     <servlet-mapping>
  118.         <servlet-name>ShopServlet</servlet-name>
  119.         <url-pattern>/shop/*</url-pattern>
  120.     </servlet-mapping>
  121.     <session-config>
  122.         <tracking-mode>COOKIE</tracking-mode>
  123.     </session-config>
  124.      </web-app>
  125.    
  126. servlet-mapping>
  127. <servlet-name>ShopServlet</servlet-name>
  128. <url-pattern>/ShopServlet</url-pattern>
  129. </servlet-mapping>
  130.    
  131. <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"
  132.     prefix="fn" %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top