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

📄 goodselectsmall_jsp.java

📁 这是一个用Struts做出来的网上商城的源代码
💻 JAVA
字号:
package org.apache.jsp.background.goods;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.*;
import com.domain.GoodsForm;

public final class goodSelectSmall_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=gb2312");
      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\r\n\r\n\r\n");
      com.dao.BigTypeDao big = null;
      synchronized (_jspx_page_context) {
        big = (com.dao.BigTypeDao) _jspx_page_context.getAttribute("big", PageContext.PAGE_SCOPE);
        if (big == null){
          big = new com.dao.BigTypeDao();
          _jspx_page_context.setAttribute("big", big, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');
      com.dao.SmallTypeDao small = null;
      synchronized (_jspx_page_context) {
        small = (com.dao.SmallTypeDao) _jspx_page_context.getAttribute("small", PageContext.PAGE_SCOPE);
        if (small == null){
          small = new com.dao.SmallTypeDao();
          _jspx_page_context.setAttribute("small", small, PageContext.PAGE_SCOPE);
        }
      }
      out.write('\r');
      out.write('\n');

List list=(List)request.getAttribute("list");
int number=Integer.parseInt((String)request.getAttribute("number"));
int maxPage=Integer.parseInt((String)request.getAttribute("maxPage"));
int pageNumber=Integer.parseInt((String)request.getAttribute("pageNumber"));
int start=number*6;//开始条数
int over=(number+1)*6;//结束条数
int count=pageNumber-over;//还剩多少条记录
if(count<=0){
  over=pageNumber;
  }

      out.write("\r\n <script Language=\"JavaScript\">\r\n function deleteType(date) {\r\n  if(confirm(\"确定要删除吗?\")){\r\n    window.location=\"bigTypeAction.do?action=3&id=\"+date;\r\n\t}\r\n  }\r\n </script>\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<title>电子商城的后台</title>\r\n<script language=\"JavaScript\" type=\"text/JavaScript\">\r\n<!--\r\nfunction MM_reloadPage(init) {  //reloads the window if Nav4 resized\r\n  if (init==true) with (navigator) {if ((appName==\"Netscape\")&&(parseInt(appVersion)==4)) {\r\n    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}\r\n  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();\r\n}\r\nMM_reloadPage(true);\r\n//-->\r\n</script>\r\n</head>\r\n <link href=\"css/css.css\" rel=\"stylesheet\" type=\"text/css\">\r\n<body>\r\n<div id=\"Layer1\" style=\"position:absolute; left:324px; top:164px; width:513px; height:23px; z-index:1\">\r\n  <div align=\"right\"><a href=\"goodsAction.do?action=0\">商品查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"bigTypeAction.do?action=0\">大类别查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"smallTypeAction.do?action=0\">小类别查询</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"javascript:history.go(-1)\">返回</a>&nbsp;&nbsp;</div>\r\n");
      out.write("</div>\r\n<table width=\"755\" height=\"100%\"  border=\"1\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n  <tr>\r\n    <td height=\"104\" colspan=\"2\"> <div align=\"center\">");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../upOne.jsp", out, false);
      out.write(" </div> </td>\r\n  </tr>\r\n  <tr>\r\n    <td height=\"15\" colspan=\"2\"><div align=\"center\">\r\n ");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../upTwo.jsp", out, false);
      out.write("\r\n    </div></td>\r\n  </tr>\r\n  <tr>\r\n    <td width=\"24%\" height=\"318\">");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../../leftManager.jsp", out, false);
      out.write("  </td>\r\n    <td width=\"76%\"><div align=\"right\"></div>\r\n    <div align=\"center\">\r\n\t  <p><strong>按小类别商品信息查询</strong></p>\r\n\t  <table width=\"90%\"  border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n        <tr>\r\n          <td width=\"14%\" height=\"25\"><div align=\"center\">数据编号</div></td>\r\n          <td width=\"19%\"><div align=\"center\">商品名称</div></td>\r\n          <td width=\"14%\"><div align=\"center\">大类别</div></td>\r\n          <td width=\"14%\"><div align=\"center\">小类别</div></td>\r\n          <td width=\"14%\"><div align=\"center\">是否特价</div></td>\r\n          <td width=\"25%\"><div align=\"center\">操作</div></td>\r\n        </tr>\r\n\t\t     ");
for(int i=start;i<over;i++){
            GoodsForm form=(GoodsForm)list.get(i);

      
      out.write("\r\n        <tr>\r\n          <td height=\"30\"><div align=\"center\">");
      out.print(form.getId());
      out.write("</div></td>\r\n          <td><div align=\"center\"><a href=\"");
      out.print(form.getPicture());
      out.write("\" target=\"_blank\">");
      out.print(form.getName());
      out.write("</a></div></td>\r\n\r\n          <td><div align=\"center\">");
      out.print(big.selectName(form.getBig()));
      out.write("</div></td>\r\n\r\n          <td><div align=\"center\">");
      out.print(small.selectName(form.getSmall()));
      out.write("</div></td>\r\n          <td><div align=\"center\">");
if(form.getMark().toString().equals("0")){
      out.write('否');
}else{
      out.write('是');
}
      out.write("</div></td>\r\n          <td><div align=\"center\"><a href=\"goodsAction.do?action=5&id=");
      out.print(form.getId());
      out.write("\">详细信息</a>\r\n\t\t \r\n\t\t\r\n\t\t \r\n\t\t  </div></td>\r\n          ");
}
      out.write("  </tr>\r\n      </table>\r\n\t  <br>\r\n\t  <table width=\"90%\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">\r\n        <tr align=\"center\">\r\n          <td width=\"13%\">共为");
      out.print(maxPage);
      out.write("页</td>\r\n          <td width=\"16%\">共有");
      out.print(pageNumber);
      out.write("条记录</td>\r\n          <td width=\"14%\">当前为第");
      out.print(number+1);
      out.write("页</td>\r\n          <td width=\"19%\">");
if((number+1)==1){
      out.write("  \r\n\t  上一页  \r\n        ");
}else{
      out.write("\r\n\t\t\r\n\t\t<a href=\"goodsAction.do?action=8&i=");
      out.print(number-1);
      out.write("&small=");
      out.print(request.getParameter("small"));
      out.write("\">\r\n\t\t  上一页</a></td>\r\n          ");
}
      out.write("\r\n          <td width=\"18%\">");
if(maxPage<=(number+1)){
      out.write("\r\n            下一页\r\n              ");
}else{
      out.write("\r\n\t \r\n\t\t<a href=\"goodsAction.do?action=8&i=");
      out.print(number+1);
      out.write("&small=");
      out.print(request.getParameter("small"));
      out.write("\">下一页</a>\r\n");
}
      out.write("\r\n\r\n\r\n        \r\n\r\n        </tr>\r\n      </table>\r\n\t  <p><br>\r\n\r\n    </p>\r\n    </div></td>\r\n  </tr>\r\n  <tr>\r\n    <td height=\"60\" colspan=\"2\"><p align=\"center\">");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../downNews.jsp", out, false);
      out.write("\r\n\r\n</p>    </td>\r\n  </tr>\r\n</table>\r\n</body>\r\n</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 + -