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

📄 list_0002ejsp_jsp.java

📁 一个较简单的图书管理系统.rar
💻 JAVA
字号:
import thisjsp.listBean.*;
import 
                   java.sql.*;
import 
                  com.borland.dx.sql.dataset.QueryDataSet;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class list_0002ejsp_jsp extends HttpJspBase {

    // begin [file="/list.jsp";from=(12,0);to=(12,72)]
    // end

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

            // end
            // HTML // begin [file="/list.jsp";from=(3,60);to=(12,0)]
                out.write("\r\n\r\n<html>\r\n<head>\r\n<title>\r\nlist\r\n</title>\r\n</head>\r\n<body link=\"#551A8B\" vlink=\"#0000EE\" alink=\"#FF0000\">\r\n");

            // end
            // begin [file="/list.jsp";from=(12,0);to=(12,72)]
                thisjsp.listBean listBeanId = null;
                boolean _jspx_speciallistBeanId  = false;
                 synchronized (session) {
                    listBeanId= (thisjsp.listBean)
                    pageContext.getAttribute("listBeanId",PageContext.SESSION_SCOPE);
                    if ( listBeanId == null ) {
                        _jspx_speciallistBeanId = true;
                        try {
                            listBeanId = (thisjsp.listBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "thisjsp.listBean");
                        } catch (ClassNotFoundException exc) {
                             throw new InstantiationException(exc.getMessage());
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of class "+"thisjsp.listBean", exc);
                        }
                        pageContext.setAttribute("listBeanId", listBeanId, PageContext.SESSION_SCOPE);
                    }
                 } 
                if(_jspx_speciallistBeanId == true) {
            // end
            // begin [file="/list.jsp";from=(12,0);to=(12,72)]
                }
            // end
            // HTML // begin [file="/list.jsp";from=(12,72);to=(13,0)]
                out.write("\r\n");

            // end
            // begin [file="/list.jsp";from=(13,0);to=(13,50)]
                JspRuntimeLibrary.introspect(pageContext.findAttribute("listBeanId"), request);
            // end
            // HTML // begin [file="/list.jsp";from=(13,50);to=(37,10)]
                out.write("\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<div align=\"center\">\r\n          \r\n    <table width=\"94%\" border=\"0\">\r\n      <tr align=\"center\"> \r\n        <td colspan=\"9\" height=\"13\" bgcolor=\"#0066bb\"><font size=\"+3\"><b><font color=\"#FFFFFF\">高校图书馆网上查书系统</font></b></font></td>\r\n      </tr>\r\n      <tr align=\"center\">\r\n        <td colspan=\"9\" height=\"14\" bgcolor=\"#0066bb\"><font color=\"#FFFFFF\">由网址:<a href=\"http://yuehui.cn.gs\">http://yuehui.cn.gs</a>提供</font></td>\r\n      </tr>\r\n      <tr> \r\n        <td colspan=\"9\" height=\"19\">按→ \r\n          <select name=\"select\">\r\n            <option selected>书名</option>\r\n            <option>序号</option>\r\n            <option>出版社</option>\r\n          </select>\r\n          查询: \r\n          <input type=\"text\" name=\"textValues\" size=\"15\" maxlength=\"100\"> <input type=\"submit\" name=\"bt\" value=\"查询\"> \r\n          <input type=\"submit\" name=\"bt\" value=\"全部浏览\"> <input type=\"submit\" name=\"bt\" value=\"第一页\"> \r\n          <input type=\"submit\" name=\"bt\" value=\"下一页\"> <input type=\"submit\" name=\"bt\" value=\"上一页\"> \r\n          <input type=\"submit\" name=\"bt\" value=\"最后页\"> <font size=\"5\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> \r\n          <!----------------------------------------------------------------------------->\r\n          ");

            // end
            // begin [file="/list.jsp";from=(37,12);to=(92,2)]
                
                
                
                try
                {
                if ("POST".equals(request.getMethod()))
                {
                    String  b=request.getParameterValues("bt")[0];//获取单击按钮名
                            b=new String(b.getBytes("ISO-8859-1"));
                    String optSlt=request.getParameterValues("select")[0];//获取查询条件
                           optSlt=new String(optSlt.getBytes("ISO-8859-1"));
                    String textValues=request.getParameterValues("textValues")[0];
                           textValues=new String(textValues.getBytes("ISO-8859-1"));
                  if (b.equals("查询"))
                  {
                      if (optSlt.equals("书名"))
                         {
                         listBeanId.getListResult(" name like '%"+textValues.trim()+"%'",out);
                         }
                      else
                         if (optSlt.equals("序号"))
                         {
                         listBeanId.getListResult(" id like '%"+textValues.trim()+"%'",out);
                         }
                         else
                         {
                             listBeanId.getListResult(" danWei like '%"+textValues.trim()+"%'",out);
                         }
                  }
                  else
                  if (b.equals("全部浏览"))
                    {
                        listBeanId.getListResult(out);//获得初始结果集
                
                    }
                    else
                        if (b.equals("第一页"))
                        {
                           listBeanId.firstPag(out);
                        }
                        else
                           if (b.equals("下一页"))
                           {
                             listBeanId.nextPage(out);
                           }
                           else
                               if (b.equals("上一页"))
                               {
                                listBeanId.previousPage(out);
                               }
                               else//最后一页
                               if (b.equals("最后页"))
                               {
                                  listBeanId.lastPage(out);
                               }
                  
            // end
            // HTML // begin [file="/list.jsp";from=(92,4);to=(105,6)]
                out.write(" </td>\r\n      </tr>\r\n      <tr> \r\n        <td width=\"35\" height=\"17\" bgcolor=\"#0066bb\"> <div align=\"center\"><font color=\"#FFFFFF\"><b>序号</b></font></div></td>\r\n        <td height=\"17\" bgcolor=\"#0066bb\" colspan=\"3\"> <div align=\"center\"><font color=\"#FFFFFF\"><b>书名&nbsp;&nbsp;(详情请单击书名)</b></font></div></td>\r\n        <td height=\"17\" bgcolor=\"#0066bb\" width=\"100\"> <div align=\"center\"><font color=\"#FFFFFF\"><b>作者</b></font></div></td>\r\n        <td height=\"17\" bgcolor=\"#0066bb\" colspan=\"2\"> <div align=\"center\"><font color=\"#FFFFFF\"><b>单价</b></font></div></td>\r\n        <td height=\"17\" bgcolor=\"#0066bb\" colspan=\"3\"> <div align=\"center\"><font color=\"#FFFFFF\"><b>出版单位</b></font></div></td>\r\n      </tr>\r\n      <tr bgcolor=\"#CCCCCC\"> \r\n        <td colspan=\"9\" height=\"1\"></td>\r\n      </tr>\r\n      <!----------------------------------------------------------------------------->\r\n      ");

            // end
            // begin [file="/list.jsp";from=(105,8);to=(107,0)]
                
                 listBeanId.getListPage(out);
            // end
            // HTML // begin [file="/list.jsp";from=(107,2);to=(112,0)]
                out.write("\r\n      <!----------------------------------------------------------------------------->\r\n    </table>\r\n </div>\r\n<!----------------------------------------------------------------------------->\r\n");

            // end
            // begin [file="/list.jsp";from=(112,2);to=(119,0)]
                
                 }
                }
                catch(Exception ee)
                {
                  out.println("Error!");
                }
            // end
            // HTML // begin [file="/list.jsp";from=(119,2);to=(124,0)]
                out.write("\r\n<!----------------------------------------------------------------------------->\r\n</form>\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 + -