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

📄 index_0002ejsp_jsp.java

📁 网上购物系统 用JSP做的 好几十页 用jbuilder运行
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class index_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/index.jsp";from=(2,0);to=(2,60)]
    // end
    // begin [file="/index.jsp";from=(3,0);to=(3,58)]
    // end

    static {
    }
    public index_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=gb2312");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

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

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

            // end
            // begin [file="/index.jsp";from=(2,0);to=(2,60)]
                beans.connDB connDB = null;
                boolean _jspx_specialconnDB  = false;
                 synchronized (pageContext) {
                    connDB= (beans.connDB)
                    pageContext.getAttribute("connDB",PageContext.PAGE_SCOPE);
                    if ( connDB == null ) {
                        _jspx_specialconnDB = true;
                        try {
                            connDB = (beans.connDB) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "beans.connDB");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"beans.connDB", exc);
                        }
                        pageContext.setAttribute("connDB", connDB, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialconnDB == true) {
            // end
            // begin [file="/index.jsp";from=(2,0);to=(2,60)]
                }
            // end
            // HTML // begin [file="/index.jsp";from=(2,60);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/index.jsp";from=(3,0);to=(3,58)]
                beans.chStr chStr = null;
                boolean _jspx_specialchStr  = false;
                 synchronized (pageContext) {
                    chStr= (beans.chStr)
                    pageContext.getAttribute("chStr",PageContext.PAGE_SCOPE);
                    if ( chStr == null ) {
                        _jspx_specialchStr = true;
                        try {
                            chStr = (beans.chStr) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "beans.chStr");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"beans.chStr", exc);
                        }
                        pageContext.setAttribute("chStr", chStr, PageContext.PAGE_SCOPE);
                    }
                 } 
                if(_jspx_specialchStr == true) {
            // end
            // begin [file="/index.jsp";from=(3,0);to=(3,58)]
                }
            // end
            // HTML // begin [file="/index.jsp";from=(3,58);to=(4,0)]
                out.write("\r\n");

            // end
            // begin [file="/index.jsp";from=(4,2);to=(8,0)]
                
                ResultSet rs_newbook=connDB.executeQuery("select top 5 * from tb_bookinfo where newbook=1 order by INTime desc");
                ResultSet rs_sort=connDB.executeQuery("select * from (select top 10 * from ( select sum(number) as amount,ISBN from tb_Order_detail group by ISBN )as tab order by amount desc) o inner join tb_bookinfo b on o.ISBN=b.ISBN order by o.amount desc");
                ResultSet rs_book=connDB.executeQuery("select * from tb_bookinfo where commend=1");
            // end
            // HTML // begin [file="/index.jsp";from=(8,2);to=(22,1)]
                out.write("\r\n<html>\r\n<head>\r\n<title>网上图书超市</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link href=\"CSS/style.css\" rel=\"stylesheet\">\r\n</head>\r\n<body>\r\n<table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td>\r\n<table width=\"777\" height=\"768\"  border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#FFFFFF\">\r\n  <tr>\r\n    <td valign=\"top\">\r\n\t");

            // end
            // begin [file="/index.jsp";from=(22,1);to=(22,30)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "Top.jsp" + _jspx_qStr, out, false);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/index.jsp";from=(22,30);to=(26,3)]
                out.write("\r\n\t<table width=\"100%\" height=\"330\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n        <tr>\r\n          <td width=\"26%\" valign=\"top\">\r\n\t\t ");

            // end
            // begin [file="/index.jsp";from=(26,3);to=(26,33)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "left.jsp" + _jspx_qStr, out, false);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/index.jsp";from=(26,33);to=(32,5)]
                out.write(" \r\n\t\t</td>\r\n          <td width=\"5\" valign=\"top\" background=\"Images/Cen_separate.gif\"></td>\r\n          <td width=\"73%\" valign=\"top\"><table width=\"100%\" height=\"272\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n            <tr>\r\n              <td height=\"52\" colspan=\"3\" background=\"Images/index_10.gif\">\r\n\t\t\t  ");

            // end
            // begin [file="/index.jsp";from=(32,5);to=(32,37)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "search.jsp" + _jspx_qStr, out, false);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/index.jsp";from=(32,37);to=(38,5)]
                out.write("\r\n              </td>\r\n            </tr>\r\n            <tr>\r\n              <td width=\"73%\" height=\"220\" valign=\"top\">\r\n\t\t\t   <table width=\"100%\" height=\"126\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n\t\t\t  ");

            // end
            // begin [file="/index.jsp";from=(38,7);to=(51,5)]
                
                			  rs_book.last();
                			  int RecordCount=rs_book.getRow();  //获取记录总数
                			  rs_book.first();
                			  for(int i=1;i<RecordCount+1;i++){
                			  //注意:此处必须按照字段的顺序读取
                			  	String ISBN=rs_book.getString("ISBN");
                			  	String bookname=rs_book.getString("BookName");
                				String publisher=rs_book.getString("publisher");
                				String author=rs_book.getString("Writer");
                				int price=rs_book.getInt("Price");
                				String cover=rs_book.getString("cover");
                			  if ((i%2)!=0){
                			  
            // end
            // HTML // begin [file="/index.jsp";from=(51,7);to=(55,76)]
                out.write("\r\n\t\t\t    <tr>\r\n                  <td><table width=\"100%\" height=\"123\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n                    <tr>\r\n                      <td width=\"43%\" align=\"center\"><img src=\"manage/cover/");

            // end
            // begin [file="/index.jsp";from=(55,79);to=(55,84)]
                out.print(cover);
            // end
            // HTML // begin [file="/index.jsp";from=(55,86);to=(58,30)]
                out.write("\" width=\"76\" height=\"110\"></td>\r\n                      <td width=\"57%\"><table width=\"100%\" height=\"119\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n                        <tr>\r\n                          <td>");

            // end
            // begin [file="/index.jsp";from=(58,33);to=(58,41)]
                out.print(bookname);
            // end
            // HTML // begin [file="/index.jsp";from=(58,43);to=(61,30)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td>");

            // end
            // begin [file="/index.jsp";from=(61,33);to=(61,42)]
                out.print(publisher);
            // end
            // HTML // begin [file="/index.jsp";from=(61,44);to=(64,33)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td>作者:");

            // end
            // begin [file="/index.jsp";from=(64,36);to=(64,42)]
                out.print(author);
            // end
            // HTML // begin [file="/index.jsp";from=(64,44);to=(66,33)]

⌨️ 快捷键说明

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