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

📄 product2_0002ejsp_jsp.java

📁 经典的“招标信息管理系统”JSP源代码
💻 JAVA
字号:
import java.util.*;
import zhaobiao.db.*;
import zhaobiao.data.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class product2_0002ejsp_jsp extends HttpJspBase {


    static {
    }
    public product2_0002ejsp_jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    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;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html; charset=GBK");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/product2.jsp";from=(0,48);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/product2.jsp";from=(1,31);to=(2,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/product2.jsp";from=(2,49);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/product2.jsp";from=(3,2);to=(24,0)]
                
                
                  long page1=1;
                  if(request.getParameter("page1")!=null)
                    page1 = Long.parseLong(request.getParameter("page1").trim());
                  long typeid=1;
                  if(request.getParameter("typeid")!=null)
                    typeid=Long.parseLong(request.getParameter("typeid").trim());
                
                  long pagemax=5;
                  long count;
                
                ProductManager productm=new ProductManager();
                Basic basic=new Basic();
                count=productm.getProductListCount(typeid);
                Type type=new Type();
                type=basic.getType(typeid);
                Vector list=new Vector();
                list=productm.getProductList(page1,pagemax,typeid);
                productm.freeCon();
                
            // end
            // HTML // begin [file="/product2.jsp";from=(24,2);to=(76,20)]
                out.write("\r\n\r\n<html>\r\n<head>\r\n<title>xxx</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link rel=\"stylesheet\" href=\"style.css\" type=\"text/css\">\r\n<script language=\"JavaScript\">\r\n<!--\r\n    function checknull()\r\n {\r\n\r\n  var a=document.form1.keys.value;\r\n    if(a==\"\")\r\n      {\r\n       alert(\"关键字不能为空!\");\r\n        return false;\r\n      }\r\n      else\r\n  return true;\r\n }\r\nfunction MM_popupMsg(msg) { //v1.0\r\n  alert(msg);\r\n}\r\n\r\nfunction MM_openBrWindow(theURL,winName,features) { //v2.0\r\n  window.open(theURL,winName,features);\r\n}\r\n//-->\r\n</script>\r\n</head>\r\n<body bgcolor=\"#FFFFFF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\r\n<center>\r\n<table width=\"776\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"103\">\r\n\r\n  <tr>\r\n      <td height=\"65\"> <a href=\"index.jsp\"><img src=\"images/zhaobiao_01.jpg\" width=\"777\" height=\"89\" align=\"absbottom\" border=\"0\"></a></td>\r\n  </tr>\r\n  </table>\r\n  <a href=\"product1.jsp\">产品信息</a> <a href=\"project1.jsp\">项目信息</a> <a href=\"maker1.jsp\">厂商信息</a><br>\r\n<table width=\"774\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td colspan=\"2\" align=\"center\">\r\n      <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n        <tr bgcolor=\"0092B8\">\r\n          <td>\r\n            <table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\" bgcolor=\"#FFFFFF\">\r\n              <tr align=\"center\">\r\n                <td>\r\n                    <table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\">\r\n                      <tr align=\"center\" bgcolor=\"E1D1B7\">\r\n                        <td height=\"25\" align=\"center\" colspan=\"13\"><b><a href=\"product1.jsp\">产品信息</a>--\r\n                    ");

            // end
            // begin [file="/product2.jsp";from=(76,23);to=(76,42)]
                out.print(type.getType_name());
            // end
            // HTML // begin [file="/product2.jsp";from=(76,44);to=(83,16)]
                out.write("</b></td>\r\n                      </tr>\r\n                      <tr bgcolor=\"F6F2E6\" align=\"center\">\r\n                        <td height=\"25\" width=\"15%\" align=\"left\">\r\n                          <p>下属产品(所有项目下此类别产品)</p>\r\n                        </td>\r\n                        <td colspan=\"4\" align=\"left\">\r\n                ");

            // end
            // begin [file="/product2.jsp";from=(83,18);to=(91,0)]
                
                
                                 if(list!=null)
                                 {
                                   for(int i=0;i<list.size();i++)
                                   {
                                     Product pd=new Product();
                                     pd=(Product)list.get(i);
            // end
            // HTML // begin [file="/product2.jsp";from=(91,2);to=(93,2)]
                out.write("\r\n\r\n  ");

            // end
            // begin [file="/product2.jsp";from=(93,5);to=(93,8)]
                out.print(i+1);
            // end
            // HTML // begin [file="/product2.jsp";from=(93,10);to=(93,38)]
                out.write(".<a href=\"product3.jsp?pdid=");

            // end
            // begin [file="/product2.jsp";from=(93,41);to=(93,59)]
                out.print(pd.getProduct_id());
            // end
            // HTML // begin [file="/product2.jsp";from=(93,61);to=(93,63)]
                out.write("\">");

            // end
            // begin [file="/product2.jsp";from=(93,66);to=(93,86)]
                out.print(pd.getProduct_name());
            // end
            // HTML // begin [file="/product2.jsp";from=(93,88);to=(96,8)]
                out.write("</a><br>\r\n                          <br>\r\n\r\n        ");

            // end
            // begin [file="/product2.jsp";from=(96,10);to=(97,0)]
                }}
            // end
            // HTML // begin [file="/product2.jsp";from=(97,2);to=(126,68)]
                out.write("                    </td>\r\n                      </tr>\r\n                    </table>\r\n                </td>\r\n              </tr>\r\n            </table>\r\n          </td>\r\n        </tr>\r\n      </table>\r\n    </td>\r\n  </tr>\r\n  <tr align=\"right\">\r\n    <td colspan=\"2\"><a href=\"#\" onClick=\"MM_openBrWindow('send_pop.shtml','','width=300,height=250')\"><br>\r\n      <br>\r\n      </a> </td>\r\n  </tr>\r\n</table>\r\n<form  name=\"form1\" method=\"POST\" action=\"search1.jsp\" onsubmit=\"return checknull()\">\r\n  关键字:\r\n  <input type=\"text\" name=\"keys\">\r\n  <select name=\"searchid\">\r\n  <option selected value=0>所有</option>\r\n    <option value=1>项目</option>\r\n    <option value=2>厂商</option>\r\n    <option value=3>产品</option>\r\n  </select>\r\n  <input type=\"submit\" name=\"submit\" value=\"搜索\">\r\n</form>\r\n    <table width=\"774\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n                    <form method=\"post\" action=\"product2.jsp?typeid=");

            // end
            // begin [file="/product2.jsp";from=(126,71);to=(126,77)]
                out.print(typeid);
            // end
            // HTML // begin [file="/product2.jsp";from=(126,79);to=(128,49)]
                out.write("\">\r\n  <tr align=\"center\" valign=\"top\">\r\n    <td height=\"20\"><a href=\"product2.jsp?typeid=");

            // end
            // begin [file="/product2.jsp";from=(128,52);to=(128,58)]
                out.print(typeid);
            // end
            // HTML // begin [file="/product2.jsp";from=(128,60);to=(129,0)]
                out.write("&page1=1\">首 页</a>\r\n");

            // end
            // begin [file="/product2.jsp";from=(129,2);to=(129,15)]
                if(page1>=2){
            // end
            // HTML // begin [file="/product2.jsp";from=(129,17);to=(130,29)]
                out.write("\r\n<a href=\"product1.jsp?typeid=");

            // end
            // begin [file="/product2.jsp";from=(130,32);to=(130,38)]
                out.print(typeid);
            // end
            // HTML // begin [file="/product2.jsp";from=(130,40);to=(130,47)]
                out.write("&page1=");

            // end
            // begin [file="/product2.jsp";from=(130,50);to=(130,57)]
                out.print(page1-1);
            // end
            // HTML // begin [file="/product2.jsp";from=(130,59);to=(131,5)]
                out.write("\">上一页<img src=\"images/aleft.gif\" width=\"18\" height=\"16\" border=\"0\" align=\"absbottom\"></a>\r\n     ");

            // end
            // begin [file="/product2.jsp";from=(131,7);to=(131,13)]
                }else{
            // end
            // HTML // begin [file="/product2.jsp";from=(131,15);to=(132,5)]
                out.write("上一页<img src=\"images/aleft.gif\" width=\"18\" height=\"16\" border=\"0\" align=\"absbottom\">\r\n     ");

            // end
            // begin [file="/product2.jsp";from=(132,7);to=(132,8)]
                }
            // end
            // HTML // begin [file="/product2.jsp";from=(132,10);to=(133,54)]
                out.write("\r\n     第<input type=\"text\" name=\"page1\" size=\"2\" value=\"");

            // end
            // begin [file="/product2.jsp";from=(133,57);to=(133,62)]
                out.print(page1);
            // end
            // HTML // begin [file="/product2.jsp";from=(133,64);to=(134,0)]
                out.write("\" onkeydown=\"if(event.keyCode==13)this.form.submit()\">页\r\n");

            // end
            // begin [file="/product2.jsp";from=(134,2);to=(134,30)]
                if(page1<(count/pagemax+1)){
            // end
            // HTML // begin [file="/product2.jsp";from=(134,32);to=(136,29)]
                out.write("\r\n<img src=\"images/aright.gif\" width=\"18\" height=\"16\" border=\"0\" align=\"absbottom\">\r\n<a href=\"product2.jsp?typeid=");

            // end
            // begin [file="/product2.jsp";from=(136,32);to=(136,38)]
                out.print(typeid);
            // end
            // HTML // begin [file="/product2.jsp";from=(136,40);to=(136,47)]
                out.write("&page1=");

            // end
            // begin [file="/product2.jsp";from=(136,50);to=(136,59)]
                out.print((page1+1));
            // end
            // HTML // begin [file="/product2.jsp";from=(136,61);to=(137,0)]
                out.write("\">下一页 </a>\r\n");

            // end
            // begin [file="/product2.jsp";from=(137,2);to=(137,8)]
                }else{
            // end
            // HTML // begin [file="/product2.jsp";from=(137,10);to=(138,0)]
                out.write("<img src=\"images/aright.gif\" width=\"18\" height=\"16\" border=\"0\" align=\"absbottom\">下一页\r\n");

            // end
            // begin [file="/product2.jsp";from=(138,2);to=(138,3)]
                }
            // end
            // HTML // begin [file="/product2.jsp";from=(138,5);to=(139,29)]
                out.write("\r\n<a href=\"product2.jsp?typeid=");

            // end
            // begin [file="/product2.jsp";from=(139,32);to=(139,38)]
                out.print(typeid);
            // end
            // HTML // begin [file="/product2.jsp";from=(139,40);to=(139,47)]
                out.write("&page1=");

            // end
            // begin [file="/product2.jsp";from=(139,50);to=(139,65)]
                out.print(count/pagemax+1);
            // end
            // HTML // begin [file="/product2.jsp";from=(139,67);to=(147,0)]
                out.write("\">最后一页</u></td>\r\n  </tr>\r\n  </form>\r\n</table>\r\n<p>&nbsp; </p>\r\n</center>\r\n</body>\r\n</html>\r\n");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

⌨️ 快捷键说明

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