⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myshop_jsp.java

📁 模仿Taobao购物网
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import taobaoproject.*;

public final class myshop_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/check.jsp");
  }

  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=GBK");
      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("\r\n");

if((String)session.getValue("Enter") != "true") {
  String errmsg = "error2";
  response.sendRedirect("login.jsp?errmsg="+errmsg);
}

      out.write('\r');
      out.write('\n');
      out.write('\r');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "head.jsp", out, true);
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<title>\r\n");
      out.write("飞梦通信:我的帐户\r\n");
      out.write("</title>\r\n");
      out.write("<style type=\"text/css\">\r\n");
      out.write("<!--\r\n");
      out.write(".shidi {font-size: 24px}\r\n");
      out.write("-->\r\n");
      out.write("</style>\r\n");
      out.write("</head>\r\n");
      taobaoproject.orderInfo_Bean dingDan = null;
      synchronized (session) {
        dingDan = (taobaoproject.orderInfo_Bean) _jspx_page_context.getAttribute("dingDan", PageContext.SESSION_SCOPE);
        if (dingDan == null){
          dingDan = new taobaoproject.orderInfo_Bean();
          _jspx_page_context.setAttribute("dingDan", dingDan, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspect(_jspx_page_context.findAttribute("dingDan"), request);
      out.write("\r\n");
      out.write("<body bgcolor=\"#D5D5B5\">\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("  <table width=\"100%\" border=\"1\" bgcolor=\"#D5D5B5\">\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td colspan=\"2\" class=\"shidi\"><strong>我的帐户</strong></td>\r\n");
      out.write("    </tr>\r\n");
      out.write("    <tr>\r\n");
      out.write("      <td height=\"400\" width=\"150\" valign=\"middle\">\r\n");
      out.write("        <table width=\"100%\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><hr /><a href=\"#\">我的订单</a><hr /></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><a href=\"user_Select.jsp\">查看个人信息</a><hr /></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><a href=\"user_Update.jsp\">修改个人信息</a><hr /></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td><a href=\"user_out.jsp\">退出</a><hr /></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table>\r\n");
      out.write("      </td>\r\n");
      out.write("      <td align=\"center\">\r\n");
      out.write("        <!--我的订单列表开始-->\r\n");
      out.write("        <div><h2>我的订单</h2></div>\r\n");
      out.write("        <table width=\"550\" border=\"1\">\r\n");
      out.write("          <tr>\r\n");
      out.write("            <th class=darkb  height=\"20\" align=\"center\" width=\"18%\">订单号</th>\r\n");
      out.write("            <th align=\"center\" width=\"28%\">金额</th>\r\n");
      out.write("            <th align=\"center\" width=\"40%\">订单日期</th>\r\n");
      out.write("            <th align=\"center\">详情</th>\r\n");
      out.write("          </tr>\r\n");
      out.write("          <!--循环开始-->\r\n");
      out.write("          ");

          String userName = (String)session.getValue("username");
          ArrayList shouJiList = dingDan.selectOrder(userName);
          for(int i =0;i< shouJiList.size();i++)  {
            orderInfo_Bean orderInfo = new orderInfo_Bean();
            orderInfo = (orderInfo_Bean)shouJiList.get(i);
          
      out.write("\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td class=darkb align=\"center\" width=\"18%\">");
      out.print(orderInfo.getOrderID() );
      out.write("</td>\r\n");
      out.write("            <td align=\"center\" width=\"28%\">");
      out.print(orderInfo.getGoodsFee() );
      out.write("&nbsp;&nbsp;元</td>\r\n");
      out.write("            <td align=\"center\" width=\"40%\">");
      out.print(orderInfo.getOrderDate() );
      out.write("</td>\r\n");
      out.write("            <td align=\"center\"><a href=\"DingDanXianXing.jsp?orderID=");
      out.print(orderInfo.getOrderID() );
      out.write("\">查看</a></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("          ");
} 
      out.write("\r\n");
      out.write("          <!---循环结束-->\r\n");
      out.write("        </table>\r\n");
      out.write("        <!--我的订单列表结束-->\r\n");
      out.write("        <table>\r\n");
      out.write("          <tr>\r\n");
      out.write("            <td></td>\r\n");
      out.write("          </tr>\r\n");
      out.write("        </table>\r\n");
      out.write("      </td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  </table>\r\n");
      out.write("</div>\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "footer.jsp", out, true);
      out.write("\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -