MerAll

StrutsCart:Thanks.jsp

Aug 24th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.39 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2.     pageEncoding="UTF-8"%>
  3. <%--@author Meredith Allen --%>
  4.    
  5. <%@ page import="pojos.UserBean,java.util.Date,java.text.DateFormat,java.text.SimpleDateFormat,
  6. java.util.List,java.util.ArrayList,java.util.Set,java.util.TreeSet,java.util.Map,java.util.HashMap,
  7. pojos.Product,pojos.CartImpl,javax.servlet.jsp.JspWriter,java.io.IOException,
  8. java.io.ObjectInputStream,java.io.FileInputStream,java.io.Serializable,
  9. java.io.ObjectOutputStream,java.io.FileOutputStream,daos.OrdersDAO,pojos.OrderBean" %>
  10.  
  11. <%-- Required to indicate that this page will make use of an existing or new session object --%>
  12. <%@ page session="true" %>
  13.  
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  15. <html>
  16. <head>
  17. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  18. <title>Thank you for your purchase!</title>
  19. </head>
  20. <body>
  21. <%
  22.     HttpSession theSession = request.getSession();
  23.     UserBean theUser = (UserBean)theSession.getAttribute("ThisUserBean");
  24.     CartImpl theCart = (CartImpl)request.getSession().getAttribute("ShoppingCart");
  25.     OrdersDAO odao = new OrdersDAO();
  26.     odao.putOrder(theUser.getUserid(), new Date(), theCart);
  27.    
  28. %>
  29. Thank you!<br>
  30. The following order has been committed to the database:<br>
  31. <%= odao.getOrderRows(theUser.getUserid(), theCart.getCartId()) %>
  32.  
  33. </body>
  34. </html>
Advertisement
Add Comment
Please, Sign In to add comment