【Java开源代码栏目提醒】:网学会员为广大网友收集整理了,cash_jsp.java,希望对大家有所帮助!
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import cn.com.shoppingonline.*;
import java.util.*;
public final class cash_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\t\r\n");
out.write("\r\n");
List shopCartList = (List)session.getAttribute(Constants.SHOPCART_KEY);
ShopCart shopCart = null;
double total=0;
out.write("\r\n");
out.write("<head>\r\n");
out.write("<link href=images/css.css rel=STYLESHEET type=text/css>\r\n");
out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
out.write("<title>鏀堕摱鍙疤?/title></head> \r\n");
out.write("<body topmargin=\"0\">\r\n");
out.write("<font color=\"#000000\"></FONT> \r\n");
out.write("<br>\r\n");
out.write("<table width=\"400\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\" height=\"50\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td align=\"center\">\r\n");
out.write(" <images border=\"0\" src=\"images/promo_list_top.gif\" width=\"100%\" height=\"4\"></td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"18\" bgcolor=\"#DBC2B0\" align=\"center\">鏀堕摱鍙?/td>\r\n");
out.write(" </tr>\r\n");
out.write(" <tr> \r\n");
out.write(" <td height=\"25\" valign=\"top\"> <form method=\"POST\" action=\"cashOk.jsp\">\r\n");
out.write(" <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" >\r\n");
out.write(" <tr> \r\n");
out.write(" <td valign=\"top\"> \r\n");
out.write(" <table border=\"0\" width=\"416\" cellspacing=\"0\" height=\"34\" cellpadding=\"0\">\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"378\" height=\"120\" valign=\"bottom\" bgcolor=\"#F5EFE7\"><p><br>\r\n");
out.write(" 鎮ㄨ璐殑鐗╁搧濡備笅:</p>\r\n");
out.write(" <div align=\"center\">\r\n");
out.write(" <center>\r\n");
out.write(" <table width=\"90%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\">\r\n");
out.write(" <tr background=\"images/tile_bg.gif\"> \r\n");
out.write(" <td width=\"195\" height=\"25\"><div align=\"center\">鍟嗗搧鍚嶇О</div></td>\r\n");
out.write(" <td width=\"60\" height=\"25\"><div align=\"center\">鍗曚环</div></td>\r\n");
out.write(" <td width=\"60\" height=\"25\"><div align=\"center\">鏁伴噺</div></td>\r\n");
out.write(" <td width=\"80\" height=\"25\"><div align=\"center\">鍚堣</div></td>\r\n");
out.write(" </tr>\r\n");
out.write(" \r\n");
out.write("\r\n");
out.write("\t ");
if(shopCartList != null ){
for(int i = 0;i < shopCartList.size();i++)
{
shopCart = (ShopCart)shopCartList.get(i);
total=total + shopCart.getPrice()*shopCart.getCount();
out.write("\r\n");
out.write("\r\n");
out.write(" <tr> \r\n");
out.write(" <td width=\"195\" height=\"25\"><div align=\"center\"><font color=red>");
out.print(shopCart.getProduct().getName());
out.write("</font></div></td>\r\n");
out.write(" <td width=\"60\" height=\"25\"><div align=\"center\">");
out.print(shopCart.getPrice());
out.write("鍏?/div></td>\r\n");
out.write(" <td width=\"60\" height=\"25\"><div align=\"center\">");
out.print(shopCart.getCount());
out.write("</div></td>\r\n");
out.write(" <td width=\"80\" height=\"25\"><div align=\"center\">"