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

📄 head_jsp.java

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

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import taobaoproject.GoodsBean;
import taobaoproject.GoodsInfo_Bean;
import taobaoproject.FenYe_Bean;

public final class head_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=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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd\">\r\n");
      out.write("<!-- saved from url=(0090)http://www.amazon.cn/channel/mobile.asp?ref=GT&pageletid=xinjiang&uid=168-6338094-9095454& -->\r\n");
      out.write("\r\n");
      taobaoproject.GoodsInfo_Bean bean0 = null;
      synchronized (session) {
        bean0 = (taobaoproject.GoodsInfo_Bean) _jspx_page_context.getAttribute("bean0", PageContext.SESSION_SCOPE);
        if (bean0 == null){
          bean0 = new taobaoproject.GoodsInfo_Bean();
          _jspx_page_context.setAttribute("bean0", bean0, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspect(_jspx_page_context.findAttribute("bean0"), request);
      out.write('\r');
      out.write('\n');
      taobaoproject.GoodsBean bean1 = null;
      synchronized (session) {
        bean1 = (taobaoproject.GoodsBean) _jspx_page_context.getAttribute("bean1", PageContext.SESSION_SCOPE);
        if (bean1 == null){
          bean1 = new taobaoproject.GoodsBean();
          _jspx_page_context.setAttribute("bean1", bean1, PageContext.SESSION_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.introspect(_jspx_page_context.findAttribute("bean1"), request);
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<link href=\"css/bottom.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write("<link href=\"css/layout.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write("<link href=\"css/channel.css\" rel=\"stylesheet\" type=\"text/css\" />\r\n");
      out.write("<LINK href=\"css/top-nav.css\" type=\"text/css\" rel=\"stylesheet\" />\r\n");
      out.write("<LINK href=\"css/browse.css\" type=\"text/css\" rel=\"stylesheet\" />\r\n");
      out.write("</head>\r\n");
      out.write("<body bgcolor=\"#ffffff\">\r\n");
      out.write("<TABLE class=header style=\"BORDER-TOP: #ffffff 3px solid\" cellSpacing=0\r\n");
      out.write("cellPadding=0 width=\"100%\" bgColor=#ffffff border=0>\r\n");
      out.write("  <TBODY>\r\n");
      out.write("  <TR>\r\n");
      out.write("    <TD class=tabs>\r\n");
      out.write("      <TABLE cellSpacing=0 cellPadding=0 align=center border=0>\r\n");
      out.write("        <TBODY>\r\n");
      out.write("        <TR id=twotabtop>\r\n");
      out.write("          <TD vAlign=top><a\r\n");
      out.write("            href=\"\"><IMG\r\n");
      out.write("            style=\"BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; MARGIN-RIGHT: 10px; BORDER-RIGHT-WIDTH: 0px\"\r\n");
      out.write("            alt=飞梦通信,网上购物,在线销售各种手机\r\n");
      out.write("            src=\"images/az-joyo_logo.gif\"></A> </TD>\r\n");
      out.write("          <TD class=leftoff height=35>\r\n");
      out.write("            <DIV style=\"VERTICAL-ALIGN: middle\" align=center><a\r\n");
      out.write("            href=\"index.jsp\">首页</A></DIV></TD>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("          <TD class=rightoff width=15 height=35><IMG height=8  alt=\"\"\r\n");
      out.write("            src=\"images/az-transparent-pixel.gif\" width=15 > </TD>\r\n");
      out.write("          <TD class=tools noWrap height=35><!-- style=\"vertical-align: middle;\"-->&nbsp;&nbsp;<a\r\n");
      out.write("            href=\"myshop.jsp\">我的帐户</A>\r\n");
      out.write("            | <a\r\n");
      out.write("            href=\"shopcar.jsp\"><IMG\r\n");
      out.write("            height=16 alt=Cart src=\"images/az-topnav-cart.gif\" width=19\r\n");
      out.write("            border=0> 购物车</a> | <a\r\n");
      out.write("            href=\"help.jsp\">帮助中心</A>\r\n");
      out.write("          </TD>\r\n");
      out.write("          <TD width=100></TD></TR></TBODY></TABLE></TD></TR>\r\n");
      out.write("  <TR>\r\n");
      out.write("    <TD class=secondary>\r\n");
      out.write("      <TABLE cellSpacing=0 cellPadding=0 align=center border=0>\r\n");
      out.write("\r\n");
      out.write("        <tr id=twotabsubnav >\r\n");
      out.write("          <TD height=\"34\" class=navspacer>\r\n");
      out.write("            <table cellSpacing=0 cellPadding=0 width=760 align=center\r\n");
      out.write("            border=0>\r\n");
      out.write("              <TBODY>\r\n");
      out.write("              <TR>\r\n");
      out.write("                <td height=\"28\" width=\"100%\">\r\n");
      out.write("                  <!-手机分类列表开始 ->\r\n");
      out.write("                  <DIV align=center>\r\n");
      out.write("                    <SPAN class=dhttext1>手机品牌:</SPAN>\r\n");
      out.write("                    ");

                    ArrayList class_List = new GoodsInfo_Bean().getClass_List("");
                    GoodsBean goodsBean = new GoodsBean();
                    for(int i = 0; i < class_List.size();i++)
                    {
                      goodsBean = (GoodsBean)class_List.get(i);
                    
      out.write("\r\n");
      out.write("                    <a class=darkb href=\"list.jsp?classID=");
      out.print(goodsBean.getClassID() );
      out.write('"');
      out.write('>');
      out.print(goodsBean.getClassName() );
      out.write("</A>\r\n");
      out.write("                    <SPAN class=dhttext1>|</SPAN>\r\n");
      out.write("                    ");
} 
      out.write("\r\n");
      out.write("                  </DIV>\r\n");
      out.write("                  <!-手机分类列表结束 ->\r\n");
      out.write("                </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>\r\n");
      out.write("      <FORM style=\"MARGIN: 2px 0px 0px\" name=searchBrick\r\n");
      out.write("      action=\"search.jsp\"  method=get>\r\n");
      out.write("      <TABLE id=TopSearch cellSpacing=0 cellPadding=0 align=center border=0>\r\n");
      out.write("        <TBODY>\r\n");
      out.write("        <tr id=twotabsearch>\r\n");
      out.write("          <td class=SearchTitle align=\"center\" >商品搜索&nbsp;</TD>\r\n");
      out.write("          <td width=100>\r\n");
      out.write("            <DIV id=topSearchCategory>\r\n");
      out.write("              <SELECT class=SearchSel style=\"WIDTH: 100px\" name=searchType>\r\n");
      out.write("              <OPTION value=\"-1\">所有类别</OPTION>\r\n");
      out.write("              ");

              for(int i = 0; i < class_List.size();i++)
                    {
                      goodsBean = (GoodsBean)class_List.get(i);
                    
      out.write("\r\n");
      out.write("              <OPTION value=\"");
      out.print(goodsBean.getClassID() );
      out.write('"');
      out.write('>');
      out.print(goodsBean.getClassName() );
      out.write("</OPTION>\r\n");
      out.write("              ");
} 
      out.write("\r\n");
      out.write("             </SELECT> </DIV></TD>\r\n");
      out.write("          <TD width=325>\r\n");
      out.write("            <INPUT class=SearchWord id=searchWord size=25 name=searchWord></TD>\r\n");
      out.write("          <TD width=5>&nbsp;</TD>\r\n");
      out.write("          <TD align=right>\r\n");
      out.write("            <INPUT type=image alt=查找 src=\"images/az-go-orange-trans.gif\" name=Go></TD>\r\n");
      out.write("          <TD>\r\n");
      out.write("            <DIV class=SearchKeyword id=searchKindArea\r\n");
      out.write("            style=\"MARGIN: 0px\"></DIV>\r\n");
      out.write("            <INPUT type=hidden value=0 name=bestSaleNum>\r\n");
      out.write("          </TD></TR></TBODY></TABLE></FORM>\r\n");
      out.write("      <TABLE cellSpacing=0 cellPadding=0 align=center border=0>\r\n");
      out.write("        <TBODY>\r\n");
      out.write("        <TR id=twotabsubnav>\r\n");
      out.write("          <TD height=\"10\" class=navspacer></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>\r\n");
      out.write("\r\n");
      out.write("<!-- 用户登录 -->\r\n");
      out.write("<div id=\"User\">\r\n");
      out.write("您好,\r\n");

String username = (String)session.getValue("username");
if(username == null) {
   username = "";

      out.write("\r\n");
      out.write("欢迎光临飞梦通信购买各种品牌手机。\r\n");
      out.write("[<a href=\"login.jsp\">登录</a>]\r\n");
      out.write("[<a href=\"huiyzhuce.jsp\">注册</a>]\r\n");
}else { 
      out.write('\r');
      out.write('\n');
      out.print(username );
      out.write("\r\n");
      out.write("欢迎光临飞梦通信购买各种品牌手机。\r\n");
      out.write("[<a href=\"user_out.jsp\">退出</a>]\r\n");
} 
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("<!--\r\n");
      out.write("<DIV id=path>\r\n");
      out.write("  <a href=\"index.jsp\">网站首页</A>\r\n");
      out.write("  &gt;<a href=\"\"> </A>\r\n");
      out.write("  &gt;<SPAN id=font12>索尼爱立信</SPAN>\r\n");
      out.write("</DIV>\r\n");
      out.write("-->\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\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 + -