package org.apache.jsp;
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$jsp extends HttpJspBase {
// begin [file="/list.jsp";from=(12,0);to=(12,72)]
// end
static {
}
public list$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\" target=\"_blank\"><font color=\"#FFFFFF\">http://yuehui.cn.gs</font></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\"> </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);
}
/
评论1