一个较简单的图书管理系统.rar

源代码在线查看: list_0002ejsp_jsp.java

软件大小: 1348 K
上传用户: archimedes88
关键词: 图书管理
下载地址: 免注册下载 普通下载 VIP

相关代码

				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\r\n\r\n\r\nlist\r\n\r\n\r\n\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\r\n\r\n          \r\n    \r\n       \r\n        高校图书馆网上查书系统\r\n      \r\n      \r\n        由网址:http://yuehui.cn.gs提供\r\n      \r\n       \r\n        按→ \r\n          \r\n            书名\r\n            序号\r\n            出版社\r\n          \r\n          查询: \r\n            \r\n            \r\n            \r\n                    \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(" \r\n      \r\n       \r\n         序号\r\n         书名  (详情请单击书名)\r\n         作者\r\n         单价\r\n         出版单位\r\n      \r\n       \r\n        \r\n      \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    \r\n \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\r\n\r\n\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);
				        }
				    }
				}
							

相关资源