📄 list_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
import taobaoproject.*;
public final class list_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("\r\n");
out.write("\r\n");
out.write("\r\n");
taobaoproject.GoodsInfo_Bean goodsInfosBean = null;
synchronized (session) {
goodsInfosBean = (taobaoproject.GoodsInfo_Bean) _jspx_page_context.getAttribute("goodsInfosBean", PageContext.SESSION_SCOPE);
if (goodsInfosBean == null){
goodsInfosBean = new taobaoproject.GoodsInfo_Bean();
_jspx_page_context.setAttribute("goodsInfosBean", goodsInfosBean, PageContext.SESSION_SCOPE);
}
}
out.write('\r');
out.write('\n');
org.apache.jasper.runtime.JspRuntimeLibrary.introspect(_jspx_page_context.findAttribute("goodsInfosBean"), request);
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");
FenYe_Bean fenYe = new FenYe_Bean();
long currentpage = 1;
String ss = request.getParameter("currentpage");
if(ss != null && !ss.equals("")) {
currentpage = Long.parseLong(ss);
}
else {
currentpage = 1;
}
int classID =1;
String classff = request.getParameter("classID");
if(classff != null && !classff.equals("")) {
classID = java.lang.Integer.parseInt(classff);
}
else {
classID = 1;
}
String sortTypes = request.getParameter("sortType");
if(sortTypes == null) {
sortTypes = "";
}
fenYe.setP_curpage(currentpage);
ArrayList goodsList = fenYe.getGoodsList(classID,"",sortTypes);
out.write("\r\n");
out.write("</head>\r\n");
out.write("<body bgcolor=\"#ffffff\">\r\n");
out.write("<DIV id=PageWidth><!--top start-->\r\n");
out.write(" <!--top end-->\r\n");
out.write("<DIV style=\"CLEAR: both\"><!--path start-->\r\n");
out.write(" <!--path end-->\r\n");
out.write(" <!-- left start-->\r\n");
out.write("<DIV id=left>\r\n");
ArrayList isDiscountList = goodsInfosBean.getGoods_List(15,-1,-1,"","","是","");
for(int i =0;i< isDiscountList.size();i++) {
GoodsBean isDiscountGoods = new GoodsBean();
isDiscountGoods = (GoodsBean)isDiscountList.get(i);
if(i ==0){
out.write("\r\n");
out.write("<DIV id=left_td-bg>特价商品</DIV>\r\n");
out.write("<DIV class=HackBox></DIV>\r\n");
out.write("<DIV id=assort>\r\n");
out.write("<UL>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write(" <LI><a href=\"xiangxi.jsp?goodsID=");
out.print(isDiscountGoods.getGoodsID() );
out.write('"');
out.write('>');
out.print(isDiscountGoods.getGoodsName() );
out.write("</A>\r\n");
}
out.write("\r\n");
out.write("</UL>\r\n");
out.write("</DIV>\r\n");
out.write("<DIV class=HackBox></DIV>\r\n");
ArrayList iserfinementList = goodsInfosBean.getGoods_List(15,-1,-1,"是","","","");
for(int i =0;i< iserfinementList.size();i++) {
GoodsBean iserfinementGoods = new GoodsBean();
iserfinementGoods = (GoodsBean)iserfinementList.get(i);
if(i ==0){
out.write("\r\n");
out.write("<DIV id=left_td-bg>今日推荐</DIV>\r\n");
out.write("<DIV class=HackBox></DIV>\r\n");
out.write("<DIV id=topsales>\r\n");
out.write("<UL>");
}
out.write("\r\n");
out.write(" <LI><a href=\"xiangxi.jsp?goodsID=");
out.print(iserfinementGoods.getGoodsID() );
out.write('"');
out.write('>');
out.print(iserfinementGoods.getGoodsName() );
out.write("</A>\r\n");
}
out.write("\r\n");
out.write("</UL>\r\n");
out.write("</DIV>\r\n");
out.write("</DIV><!-- left end --><!--content start-->\r\n");
out.write("<DIV id=product-list><!--search result start-->\r\n");
out.write("<DIV id=product_td-bg>\r\n");
out.write("<DIV class=result>显示:");
out.print(fenYe.getK_start() );
out.write('-');
out.print(fenYe.getK_end() );
out.write('条');
out.write(' ');
out.write('共');
out.print(fenYe.getP_totalnum() );
out.write("条 </DIV>\r\n");
out.write("<form style=\"PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px\"\r\n");
out.write("name=searchform\r\n");
out.write("action=\"list.jsp\" method=post>\r\n");
out.write("<input type=\"hidden\" name=\"classID\" value=\"");
out.print(classID );
out.write("\" />\r\n");
out.write("<DIV class=btn-go><input type=image alt=Go src=\"images/az-go-orange-trans.gif\" align=middle ></DIV>\r\n");
out.write("<DIV class=sort-view>\r\n");
out.write(" <SELECT style=\"MARGIN: 3px 0px 1px\" name=\"sortType\">\r\n");
out.write(" <OPTION value=\"time\" selected>上架时间↑</OPTION>\r\n");
out.write(" <OPTION value=\"dptime\">上架时间↓</OPTION>\r\n");
out.write(" <OPTION value=\"price\">商品价格↑</OPTION>\r\n");
out.write(" <OPTION value=\"dprice\">商品价格↓</OPTION>\r\n");
out.write(" </SELECT>\r\n");
out.write("</DIV></FORM></DIV>\r\n");
out.write("<DIV class=HackBox1></DIV>\r\n");
out.write("<DIV id=product-3col>\r\n");
boolean stast=true;
for(int i=0;i<goodsList.size();i++)
{
GoodsBean goods = new GoodsBean();
goods = (GoodsBean)goodsList.get(i);
if(stast == true)
{
out.print("<TABLE cellSpacing=0 cellPadding=0 width='100%' border=0> <TBODY> <TR>");
stast = false;
}
out.write("\r\n");
out.write(" <td align=\"center\">\r\n");
out.write(" ");
out.write("\r\n");
out.write(" <div>");
out.print(goods.getGoodsName() );
out.write("<br />\r\n");
out.write(" <a href=\"xiangxi.jsp?goodsID=");
out.print(goods.getGoodsID() );
out.write("\"><img width=\"150\" height=150 alt=\"");
out.print(goods.getGoodsName() );
out.write("\" src=\"");
out.print(goods.getGoodsUrl() );
out.write("\" border=0> </a>\r\n");
out.write(" </div>\r\n");
out.write(" ");
out.write("\r\n");
out.write(" ");
out.write("\r\n");
out.write(" <div id=line-height><BR>市场价:<S>¥");
out.print(goods.getMarketPrice() );
out.write("</S>\r\n");
out.write(" 元<BR>卓越价:<SPAN class=our-price>¥</SPAN>");
out.print(goods.getMemberPrice() );
out.write(" 元</DIV>\r\n");
out.write(" ");
out.write("\r\n");
out.write(" ");
out.write("\r\n");
out.write(" <DIV id=btn>\r\n");
out.write(" <a href=\"xiangxi.jsp?goodsID=");
out.print(goods.getGoodsID() );
out.write("\"><IMG src=\"images/az-add-to-shopping-cart-sm-pri.gif\" alt=\"\" border=0></A> \r\n");
out.write(" <a href=\"xiangxi.jsp?goodsID=");
out.print(goods.getGoodsID() );
out.write("\"><IMG src=\"images/az-add-to-favorites-sm-pri.gif\" alt=\"\" border=0></A></DIV></TD>\r\n");
out.write(" ");
out.write("\r\n");
out.write(" ");
if((i+1)>=3 && (i+1)%3==0)
{
out.print("</TR></TBODY></TABLE><hr>");
stast = true;
}
else if(i+1 == goodsList.size())
{
if((i+3)%3==0){
out.print("<td></td>");
}
out.print("<td></td>");
out.print("</TR></TBODY></TABLE><hr>");
}
}
out.write("\r\n");
out.write("\r\n");
out.write("<DIV id=result-page>\r\n");
out.write(" <a href=\"list.jsp?classID=");
out.print(classID );
out.write("¤tpage=");
out.print(fenYe.getPrepage() );
out.write("&sortType=");
out.print(sortTypes );
out.write("\">\r\n");
out.write(" 上一页 </a>\r\n");
out.write(" \r\n");
out.write(" <a href=\"list.jsp?classID=");
out.print(classID );
out.write("¤tpage=");
out.print(fenYe.getNextpage() );
out.write("&sortType=");
out.print(sortTypes );
out.write("\">\r\n");
out.write(" 下一页 </a>\r\n");
out.write("</DIV></DIV><!--search result end--></DIV><!--content end--></DIV><!--clear:both--><!--bottom start-->\r\n");
out.write("<DIV class=HackBox></DIV>\r\n");
out.write("<!--bottom end-->\r\n");
out.write("</DIV>\r\n");
out.write(" ");
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 + -