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

📄 book_0005fdetail_0002ejsp_jsp.java

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


public class book_0005fdetail_0002ejsp_jsp extends HttpJspBase {

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

    static {
    }
    public book_0005fdetail_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="/book_detail.jsp";from=(0,87);to=(1,0)]
                out.write("\r\n");

            // end
            // begin [file="/book_detail.jsp";from=(1,0);to=(1,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="/book_detail.jsp";from=(1,0);to=(1,60)]
                }
            // end
            // HTML // begin [file="/book_detail.jsp";from=(1,60);to=(2,0)]
                out.write("\r\n");

            // end
            // begin [file="/book_detail.jsp";from=(2,0);to=(2,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="/book_detail.jsp";from=(2,0);to=(2,58)]
                }
            // end
            // HTML // begin [file="/book_detail.jsp";from=(2,58);to=(3,0)]
                out.write("\r\n");

            // end
            // begin [file="/book_detail.jsp";from=(3,2);to=(5,0)]
                
                ResultSet rs=connDB.executeQuery("select * from tb_bookinfo where ISBN='"+request.getParameter("ISBN")+"'");
            // end
            // HTML // begin [file="/book_detail.jsp";from=(5,2);to=(19,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\" background=\"Images/bg.gif\">\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="/book_detail.jsp";from=(19,1);to=(19,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="/book_detail.jsp";from=(19,30);to=(23,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="/book_detail.jsp";from=(23,3);to=(23,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="/book_detail.jsp";from=(23,33);to=(29,15)]
                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               ");

            // end
            // begin [file="/book_detail.jsp";from=(29,15);to=(29,47)]
                {
                    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="/book_detail.jsp";from=(29,47);to=(34,5)]
                out.write("\t\t  </td>\r\n            </tr>\r\n            <tr>\r\n              <td width=\"97%\" 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="/book_detail.jsp";from=(34,7);to=(45,5)]
                
                			  if(rs.next()){
                			  //注意:此处只能按照字段的顺序读取
                			  	String ISBN=rs.getString("ISBN");
                			  	String bookname=rs.getString("BookName");
                				String publisher=rs.getString("publisher");
                				String writer=rs.getString("writer");
                				String Introduce=chStr.chStr(rs.getString("Introduce"));
                				int price=rs.getInt("Price");
                				String pDate=rs.getString("pDate");
                				String cover=rs.getString("cover");
                			  
            // end
            // HTML // begin [file="/book_detail.jsp";from=(45,7);to=(49,89)]
                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=\"23%\" align=\"center\" valign=\"top\"><img src=\"manage/cover/");

            // end
            // begin [file="/book_detail.jsp";from=(49,92);to=(49,97)]
                out.print(cover);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(49,99);to=(53,42)]
                out.write("\" width=\"110\" height=\"158\"></td>\r\n                      <td width=\"77%\"><table width=\"100%\" height=\"202\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n                        <tr>\r\n                          <td width=\"16%\" height=\"24\">书&nbsp;&nbsp;号:</td>\r\n                          <td width=\"84%\">");

            // end
            // begin [file="/book_detail.jsp";from=(53,45);to=(53,49)]
                out.print(ISBN);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(53,51);to=(57,42)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td width=\"16%\" height=\"24\">书&nbsp;&nbsp;名:</td>\r\n                          <td width=\"84%\">");

            // end
            // begin [file="/book_detail.jsp";from=(57,45);to=(57,53)]
                out.print(bookname);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(57,55);to=(61,30)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td height=\"24\">出版社:</td>\r\n                          <td>");

            // end
            // begin [file="/book_detail.jsp";from=(61,33);to=(61,42)]
                out.print(publisher);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(61,44);to=(65,30)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td height=\"24\">作&nbsp;&nbsp;者:</td>\r\n                          <td>");

            // end
            // begin [file="/book_detail.jsp";from=(65,33);to=(65,39)]
                out.print(writer);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(65,41);to=(69,30)]
                out.write("</td>\r\n                        </tr>\r\n                        <tr>\r\n                          <td height=\"24\">定 &nbsp;价:</td>\r\n                          <td>");

            // end
            // begin [file="/book_detail.jsp";from=(69,33);to=(69,38)]
                out.print(price);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(69,40);to=(73,30)]
                out.write("(元)</td>\r\n                        </tr>\r\n\t\t\t\t\t\t <tr>\r\n                          <td height=\"24\">出版日期:</td>\r\n                          <td>");

            // end
            // begin [file="/book_detail.jsp";from=(73,33);to=(73,38)]
                out.print(pDate);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(73,40);to=(75,58)]
                out.write("</td>\r\n                        </tr>\r\n                          <tr><td height=\"39\" colspan=\"2\">");

            // end
            // begin [file="/book_detail.jsp";from=(75,61);to=(75,70)]
                out.print(Introduce);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(75,72);to=(77,58)]
                out.write("</td>\r\n                        </tr>\r\n                          <tr><td height=\"40\" colspan=\"2\">");

            // end
            // begin [file="/book_detail.jsp";from=(77,60);to=(77,103)]
                if(session.getAttribute("UserName")!=null){
            // end
            // HTML // begin [file="/book_detail.jsp";from=(77,105);to=(78,124)]
                out.write("\r\n\t\t\t\t\t\t  <input name=\"Submit5\" type=\"submit\" class=\"btn_grey\" value=\"放入购物车\" onClick=\"window.location.href='cart_Add.jsp?ISBN=");

            // end
            // begin [file="/book_detail.jsp";from=(78,127);to=(78,131)]
                out.print(ISBN);
            // end
            // HTML // begin [file="/book_detail.jsp";from=(78,133);to=(79,8)]
                out.write("'\">\r\n\t\t\t\t\t\t  ");

            // end
            // begin [file="/book_detail.jsp";from=(79,10);to=(79,11)]
                }
            // end
            // HTML // begin [file="/book_detail.jsp";from=(79,13);to=(86,6)]
                out.write("\r\n                          <input name=\"Submit52\" type=\"button\" class=\"btn_grey\" value=\"返回\" onClick=\"history.back(1);\">\r\n</td>\r\n                          </tr>\r\n                      </table></td>\r\n                    </tr>\r\n                  </table></td>\r\n\t\t\t\t  ");

            // end
            // begin [file="/book_detail.jsp";from=(86,8);to=(86,10)]
                 }
            // end
            // HTML // begin [file="/book_detail.jsp";from=(86,12);to=(95,6)]
                out.write("\r\n\t\t\t     </tr>\r\n              </table>\r\n\t\t\t\t\t  </td>\r\n              <td width=\"3%\" valign=\"top\">&nbsp;</td>\r\n            </tr>\r\n          </table></td>\r\n        </tr>\r\n      </table>\r\n      ");

            // end
            // begin [file="/book_detail.jsp";from=(95,6);to=(95,41)]
                {
                    String _jspx_qStr = "";
                    JspRuntimeLibrary.include(request, response, "copyright.jsp" + _jspx_qStr, out, false);
                    if ("true".equals(request.getAttribute("javax.servlet.forward.seen")))
                        return;
                }
            // end
            // HTML // begin [file="/book_detail.jsp";from=(95,41);to=(104,0)]
                out.write("\r\n    </td>\r\n  </tr>\r\n</table>\r\n</td>\r\n  </tr>\r\n</table>\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 + -