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

📄 booklist_jsp.java

📁 网上书店
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;

public final class booklist_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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\r\n");
      out.write("\r\n");
      out.write("\r\n");
      cuug.BookBean book = null;
      synchronized (_jspx_page_context) {
        book = (cuug.BookBean) _jspx_page_context.getAttribute("book", PageContext.PAGE_SCOPE);
        if (book == null){
          book = new cuug.BookBean();
          _jspx_page_context.setAttribute("book", book, PageContext.PAGE_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("<HTML>\r\n");
      out.write("<HEAD>\r\n");
      out.write("<META http-equiv=\"Content-Style-Type\" content=\"text/css\">\r\n");
      out.write("<TITLE>\r\n");
      out.write("CUUG Book Store On Line -member:");
      out.print( session.getValue("memberID") );
      out.write("\r\n");
      out.write("</TITLE>\r\n");
      out.write("<SCRIPT language=\"JavaScript\">\r\n");
      out.write("<!--\r\n");
      out.write("function openwin(str)\r\n");
      out.write("{\twindow.open(\"addcart.jsp?isbn=\"+str,  \r\n");
      out.write("\"shoppingcart\",\"width=300,height=200,resizable=1,scrollbars=2\");\r\n");
      out.write("\treturn;\r\n");
      out.write("}\r\n");
      out.write("//-->\r\n");
      out.write("</SCRIPT>\r\n");
      out.write("</HEAD>\r\n");
      out.write("<BODY BGCOLOR=\"#FFFFFF\">\r\n");
      out.write("<H1 align=\"center\">CUUG ÍøÉÏÊéµê");
      out.print(session.getValue("memberID"));
      out.write("</H1>\r\n");
  
if (session.getValue("memberID") == null||"".equals(session.getValue("memberID"))){

      out.write("\r\n");
      out.write("    <H2 align=\"center\">ÇëÏȵǼ,È»ºóÔÙÑ¡Êé</H2>\r\n");
      out.write("    <H2 align=\"center\"><A href=\"default.htm\">怬</A></H2>\r\n");

}
else{

      out.write("\r\n");
      out.write("<table width=\"100%\" border=\"1\" cellspacing=\"0\" bordercolor=\"#9999FF\">\r\n");
      out.write("  <tr> \r\n");
      out.write("    <td><font color=\"#3333FF\">ÊéÃû</font></td>\r\n");
      out.write("    <td><font color=\"#3333FF\">×÷Õß</font></td>\r\n");
      out.write("    <td><font color=\"#3333FF\">³ö°æÉç</font></td>\r\n");
      out.write("    <td><font color=\"#3333FF\">¶¨¼Û</font></td>\r\n");
      out.write("    <td>&nbsp;</td>\r\n");
      out.write("  </tr>\r\n");

    ResultSet rs = book.getBookList();
    while(rs.next()){
     	String ISBN = rs.getString("bookISBN");

      out.write(" \r\n");
      out.write("  <tr> \r\n");
      out.write("    <td><a href=\"bookinfo.jsp?isbn=\r\n");
      out.print( ISBN);
      out.write('"');
      out.write('>');
      out.print( rs.getString("bookName"));
      out.write("</A></td>\r\n");
      out.write("    <td>");
      out.print( rs.getString("bookAuthor"));
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print( rs.getString("publisher"));
      out.write("</td>\r\n");
      out.write("    <td>");
      out.print( rs.getString("price"));
      out.write("</td>\r\n");
      out.write("    <td><a href='Javascript:openwin(\"");
      out.print( ISBN );
      out.write("\")'>¼ÓÈ빺Îï³µ</a></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  ");

   }   

      out.write("   \r\n");
      out.write("</table>\r\n");
      out.write("<table align=\"center\" border=\"0\">\r\n");
      out.write("  <tbody> \r\n");
      out.write("  <tr> \r\n");
      out.write("    <td><a href=\"shoppingcart.jsp\"><font color=\"#0000FF\">²é¿´¹ºÎï³µ</font></a></td>\r\n");
      out.write("    <td></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  </tbody> \r\n");
      out.write("</table>\r\n");
      out.write("<p>&nbsp;</p>\r\n");

}

      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 + -