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

📄 firstpage_jsp.java

📁 图书管理系统。JSP+Struts(MVC框架)sql2000数据库
💻 JAVA
字号:
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import java.util.List;
import com.actionForm.BookForm;

public final class firstPage_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,
      			"", 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");
      out.write("\r\n");
      out.write("\r\n");
      com.dao.BookDao bookDao = null;
      synchronized (request) {
        bookDao = (com.dao.BookDao) _jspx_page_context.getAttribute("bookDao", PageContext.REQUEST_SCOPE);
        if (bookDao == null){
          bookDao = new com.dao.BookDao();
          _jspx_page_context.setAttribute("bookDao", bookDao, PageContext.REQUEST_SCOPE);
        }
      }
      out.write("\r\n");
      out.write("\r\n");

List list=bookDao.selectBooks(0);

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n");
      out.write("<title>科院图书管理系统――图书管理</title>\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("</head>\r\n");
      out.write("<body>\r\n");
      out.write("<div align=\"center\">\r\n");
      out.write("\r\n");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "topOne.jsp", out, true);
      out.write('\r');
      out.write('\n');
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "topTwo.jsp", out, true);
      out.write("\r\n");
      out.write("<table width=\"799\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"21\" class=\"word_black\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您当前的位置――首页</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<table width=\"799\" height=\"28\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"Images/operationOne.jpg\">\r\n");
      out.write("  <tr align=\"center\">\r\n");
      out.write("    <td><span class=\"STYLE4\">-------------------最新图书--------------------</span></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>\r\n");
      out.write("<table width=\"799\" height=\"457\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder_B_dashed\">\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td valign=\"top\" ><div align=\"center\">\r\n");
      out.write("      <br>\r\n");
      out.write("\t  <table width=\"750\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\"  bgcolor=\"#FFFFFF\" bordercolordark=\"#819BBC\" bordercolorlight=\"#FFFFFF\">\r\n");
      out.write("        <tr align=\"center\" bgcolor=\"#CCCCCC\"  class=\"word_white\" >\r\n");
      out.write("          <td width=\"85\">编号</td>\r\n");
      out.write("          <td width=\"125\" height=\"25\" bgcolor=\"#CCCCCC\">书名</td>\r\n");
      out.write("\r\n");
      out.write("          <td width=\"85\">作者</td>\r\n");
      out.write("          <td width=\"85\">定价</td>\r\n");
      out.write("           <td width=\"85\">库存数量</td>\r\n");
      out.write("          <td width=\"100\">出版社</td>\r\n");
      out.write("          <td width=\"85\">图书条形码</td>\r\n");
      out.write("\r\n");
      out.write("        </tr>\r\n");
      out.write("\t\t");
for(int i=0;i<list.size();i++){
                  BookForm form=(BookForm)list.get(i);
                  
      out.write("\r\n");
      out.write("      <tr  align=\"center\" onMouseMove=\"color=this.style.backgroundColor;this.style.backgroundColor='rgb(214,229,249)'\" style=\"width: 529px\" onMouseOut=\"this.style.backgroundColor='white'\">\r\n");
      out.write("          <td height=\"25\">");
      out.print(form.getBookNumber());
      out.write("</td>\r\n");
      out.write("          <td><div align=\"left\">&nbsp;<a href=\"bookAction.do?method=selectBookOneAction&bookNumber=");
      out.print(form.getBookNumber());
      out.write('"');
      out.write('>');
      out.write('《');
      out.print(form.getBookName());
      out.write("》</a></div></td>\r\n");
      out.write("\r\n");
      out.write("          <td>");
      out.print(form.getAuthor());
      out.write("</td>\r\n");
      out.write("          <td>");
      out.print(form.getSinglePirce());
      out.write("元</td>\r\n");
      out.write("             <td>");
      out.print(form.getBookSum());
      out.write("本</td>\r\n");
      out.write("          <td>");
      out.print(form.getPublish());
      out.write("</td>\r\n");
      out.write("          <td>");
      out.print(form.getLineNumber());
      out.write("</td>\r\n");
      out.write("\r\n");
      out.write("        </tr>\r\n");
      out.write("\t\t");
}
      out.write("\r\n");
      out.write("      </table>\r\n");
      out.write("\r\n");
      out.write("    </div></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("</table>");
      org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "bottom.jsp", out, true);
      out.write("\r\n");
      out.write("</div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
      out.write("\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 + -