📄 _showcart.java
字号:
/*@lineinfo:filename=/ShowCart.jsp*/
/*@lineinfo:generated-code*/
import oracle.jsp.runtime.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import Model_PetType.*;
import Model_CartItem.*;
import Model_ItemInfo.*;
import java.util.*;
import java.text.*;
import javax.servlet.http.HttpSession;
import java.util.Collection;
import java.util.Iterator;
public class _ShowCart extends com.orionserver.http.OrionHttpJspPage {
public final String _globalsClassName = null;
// ** Begin Declarations
// ** End Declarations
public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException {
response.setContentType( "text/html;charset=GB2312");
/* set up the intrinsic variables using the pageContext goober:
** session = HttpSession
** application = ServletContext
** out = JspWriter
** page = this
** config = ServletConfig
** all session/app beans declared in globals.jsa
*/
PageContext pageContext = JspFactory.getDefaultFactory().getPageContext( this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);
// Note: this is not emitted if the session directive == false
HttpSession session = pageContext.getSession();
int __jsp_tag_starteval;
ServletContext application = pageContext.getServletContext();
JspWriter out = pageContext.getOut();
_ShowCart page = this;
ServletConfig config = pageContext.getServletConfig();
com.evermind.server.http.JspCommonExtraWriter __ojsp_s_out = (com.evermind.server.http.JspCommonExtraWriter) out;
try {
// global beans
// end global beans
__ojsp_s_out.write(__oracle_jsp_text[0]);
__ojsp_s_out.write(__oracle_jsp_text[1]);
__ojsp_s_out.write(__oracle_jsp_text[2]);
__ojsp_s_out.write(__oracle_jsp_text[3]);
__ojsp_s_out.write(__oracle_jsp_text[4]);
__ojsp_s_out.write(__oracle_jsp_text[5]);
__ojsp_s_out.write(__oracle_jsp_text[6]);
__ojsp_s_out.write(__oracle_jsp_text[7]);
__ojsp_s_out.write(__oracle_jsp_text[8]);
/*@lineinfo:user-code*//*@lineinfo:34^13*/ out.print(request.getParameter("Loginid"));
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[9]);
/*@lineinfo:user-code*//*@lineinfo:35^13*/
String loginid=request.getParameter("Loginid");
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[10]);
/*@lineinfo:user-code*//*@lineinfo:40^69*/
java.text.SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd");
String date=format.format(new java.util.Date());
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[11]);
/*@lineinfo:user-code*//*@lineinfo:69^23*/
HttpSession hs1=request.getSession();
if(hs1.getAttribute("cart")==null)
{
hs1.setAttribute("cart",new CartItemBean());
}
CartItemBean cib1=(CartItemBean)hs1.getAttribute("cart");
int Count1=cib1.AllCount();
double Sum1=cib1.AllSum();
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[12]);
/*@lineinfo:user-code*//*@lineinfo:79^28*/ out.print(Count1);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[13]);
/*@lineinfo:user-code*//*@lineinfo:80^28*/ out.print(Sum1);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[14]);
/*@lineinfo:user-code*//*@lineinfo:88^21*/
PetTypeBean ptb=new PetTypeBean();
Collection col=ptb.SelectPetType();
Iterator ita=col.iterator();
while (ita.hasNext())
{
PetType pt=(PetType)ita.next();
String n=pt.getPetTypeName();
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[15]);
/*@lineinfo:user-code*//*@lineinfo:98^29*/ out.print(n);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[16]);
/*@lineinfo:user-code*//*@lineinfo:99^21*/
}
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[17]);
/*@lineinfo:user-code*//*@lineinfo:132^27*/
double total=0.0;
HttpSession hs=request.getSession();
if(hs.getAttribute("cart")==null)
{
hs.setAttribute("cart",new CartItemBean());
}
CartItemBean cib=(CartItemBean)hs.getAttribute("cart");
Collection col4=cib.getAllItem();
Iterator it4=col4.iterator();
while (it4.hasNext())
{
CartItem ci=(CartItem)it4.next();
String itemid=ci.getId();
int count=Integer.parseInt(ci.getNum());
double sum=Double.parseDouble(ci.getCost());
total=total+sum;
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[18]);
/*@lineinfo:user-code*//*@lineinfo:151^37*/ out.print(itemid);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[19]);
/*@lineinfo:user-code*//*@lineinfo:151^119*/ out.print(count);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[20]);
/*@lineinfo:user-code*//*@lineinfo:151^141*/ out.print(sum);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[21]);
/*@lineinfo:user-code*//*@lineinfo:153^27*/
}
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[22]);
/*@lineinfo:user-code*//*@lineinfo:156^72*/ out.print(total);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[23]);
/*@lineinfo:user-code*//*@lineinfo:163^145*/ out.print(loginid);
/*@lineinfo:generated-code*/
__ojsp_s_out.write(__oracle_jsp_text[24]);
}
catch( Throwable e) {
try {
if (out != null) out.clear();
}
catch( Exception clearException) {
}
pageContext.handlePageException( e);
}
finally {
OracleJspRuntime.extraHandlePCFinally(pageContext,false);
JspFactory.getDefaultFactory().releasePageContext(pageContext);
}
}
private static final byte __oracle_jsp_text[][]=new byte[25][];
static {
try {
__oracle_jsp_text[0] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[1] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[2] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[3] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[4] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[5] =
"\r\n\r\n".getBytes("EUC_CN");
__oracle_jsp_text[6] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[7] =
"\r\n".getBytes("EUC_CN");
__oracle_jsp_text[8] =
"\r\n<html>\r\n <head>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=GB2312\">\r\n <title>untitled</title>\r\n </head>\r\n <body>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\" height=\"100%\">\r\n <tr>\r\n <td width=\"36%\">\r\n <img src=\"E:\\学习\\JSPPetShop\\Image\\logo.gif\" width=\"202\" height=\"61\"/>\r\n </td>\r\n <td width=\"64%\"> </td>\r\n </tr>\r\n <tr>\r\n <td colspan=\"2\"> </td>\r\n </tr>\r\n <tr style=\"font-size:x-small;\">\r\n <td width=\"29%\" colspan=\"2\">\r\n <form>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\r\n <tr>\r\n <td width=\"21%\" align=\"right\" style=\"font-size:x-small;\">欢迎您:</td>\r\n <td width=\"19%\" align=\"left\" style=\"font-size:x-small;\"> \r\n ".getBytes("EUC_CN");
__oracle_jsp_text[9] =
"\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[10] =
"\r\n </td>\r\n <td width=\"11%\" align=\"right\" style=\"font-size:x-small;\"> </td>\r\n <td width=\"20%\" align=\"left\" style=\"font-size:x-small;\">".getBytes("EUC_CN");
__oracle_jsp_text[11] =
"\r\n </td>\r\n <td width=\"8%\" style=\"font-size:x-small;\"> \r\n </td>\r\n <td width=\"9%\" align=\"right\" style=\"font-size:x-small;\">\r\n <a href=\"AddCustomer.jsp\">注册</a>\r\n </td>\r\n <td width=\"12%\"> </td>\r\n </tr>\r\n </table>\r\n </form>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td width=\"36%\" colspan=\"2\">\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\r\n <tr>\r\n <td width=\"23%\">\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"100%\">\r\n <tr>\r\n <td align=\"center\" bgcolor=\"Red\">我的购物车状态</td>\r\n </tr>\r\n <tr style=\"font-size:x-small;\">\r\n <td height=\"80\" style=\"border-color:rgb(255,0,0);\" align=\"center\" valign=\"top\">\r\n <P align=\"center\"> </P>\r\n <P align=\"center\">\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[12] =
"\r\n <p>您有".getBytes("EUC_CN");
__oracle_jsp_text[13] =
"种商品在购物车中</p>\r\n <p>总计".getBytes("EUC_CN");
__oracle_jsp_text[14] =
"¥</p>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td align=\"center\" bgcolor=\"Red\">网站商品架</td>\r\n </tr>\r\n <tr style=\"font-size:x-small;\">\r\n <td align=\"center\" valign=\"top\" style=\"border-color:rgb(255,0,0);\">\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[15] =
"\r\n <br>\r\n <a>".getBytes("EUC_CN");
__oracle_jsp_text[16] =
"</a>\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[17] =
"\r\n </br>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n <td width=\"77%\" valign=\"top\">\r\n <form>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"100%\">\r\n <tr>\r\n <td align=\"right\" valign=\"middle\" style=\"font-size:x-small;\">\r\n 按类别搜索:\r\n <select size=\"1\">\r\n <option value=\"Value\">Caption</option>\r\n </select>\r\n <input type=\"submit\" value=\"查找\"/>\r\n \r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n <form>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" width=\"700\">\r\n <tr>\r\n <td align=\"left\">宠物信息</td>\r\n </tr>\r\n <tr>\r\n <td>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"720\">\r\n <tr>\r\n <td bgcolor=\"Silver\">商品编号</td><td bgcolor=\"Silver\">购买数量</td><td bgcolor=\"Silver\">金额</td>\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[18] =
"\r\n <tr>\r\n <td>".getBytes("EUC_CN");
__oracle_jsp_text[19] =
"</td><td><input type=\"text\" name=\"Pwd\" maxlength=\"20\" size=\"10\" value=\"".getBytes("EUC_CN");
__oracle_jsp_text[20] =
"\"/></td><td>".getBytes("EUC_CN");
__oracle_jsp_text[21] =
"</td>\r\n </tr>\r\n ".getBytes("EUC_CN");
__oracle_jsp_text[22] =
"\r\n <tr><td></td><td></td><td align=\"right\">总金额为:".getBytes("EUC_CN");
__oracle_jsp_text[23] =
"</td></tr>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n </form>\r\n <table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"720\"><td></td><td></td><td align=\"right\"><a href=\"Orderform.jsp?Loginid=".getBytes("EUC_CN");
__oracle_jsp_text[24] =
"\">生成订单</a></td></table>\r\n </td>\r\n </tr>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n </body>\r\n</html>\r\n\r\n".getBytes("EUC_CN");
}
catch (Throwable th) {
System.err.println(th);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -