selectbook_jsp.java
来自「图书管理系统。JSP+Struts(MVC框架)sql2000数据库」· Java 代码 · 共 212 行
JAVA
212 行
package org.apache.jsp.book;
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 selectBook_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");
out.write("\r\n");
out.write("\r\n");
List list=(List)request.getAttribute("list");
String changeNumber=(String)request.getAttribute("number");
int number=Integer.parseInt(changeNumber);
String changeMaxPage=(String)request.getAttribute("maxPage");
int maxPage=Integer.parseInt(changeMaxPage);
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("<script language=\"javascript\" type=\"\">\r\n");
out.write("function deleteForm(date1,date2){\r\n");
out.write("if(confirm(\"确定删除吗?\")){\r\n");
out.write("window.location.href=\"bookAction.do?method=deleteBookAction&bookNumber=\"+date1+\"&number=\"+date2;\r\n");
out.write("}\r\n");
out.write("}\r\n");
out.write("</script>\r\n");
out.write("\r\n");
out.write("</head>\r\n");
out.write("\r\n");
out.write("<body>\r\n");
out.write("<div align=\"center\">\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("\r\n");
out.write("<table width=\"799\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"Images/upPlace.jpg\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td height=\"21\" class=\"word_black\"> 您当前的位置――图书管理――图书查询</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 width=\"519\"><span class=\"STYLE4\"> 图书查询</span></td>\r\n");
out.write(" <td width=\"280\"><table width=\"280\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <form name=\"form1\" method=\"post\" action=\"bookAction.do?method=selectAllOneBookAction\" onSubmit=\"return selectlineNumber()\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"222\"><a href=\"bookAction.do?method=selectAllOneBookAction\">以书籍名字或者条形码查询</a></td>\r\n");
out.write(" </tr>\r\n");
out.write(" </form>\r\n");
out.write(" </table></td>\r\n");
out.write(" </tr>\r\n");
out.write("</table>\r\n");
out.write("\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\" bordercolor=\"#FFFFFF\" bordercolordark=\"#819BBC\" bordercolorlight=\"#FFFFFF\">\r\n");
out.write(" <tr align=\"center\" bgcolor=\"#83B9FF\" class=\"word_white\" >\r\n");
out.write(" <td width=\"49\">编号</td>\r\n");
out.write(" <td width=\"175\" height=\"25\" bgcolor=\"#83B9FF\">书名</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=\"161\">出版社</td>\r\n");
out.write(" <td width=\"90\">操作</td>\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\" >\r\n");
out.write(" <td height=\"25\">");
out.print(form.getBookNumber());
out.write("</td>\r\n");
out.write(" <td><div align=\"left\"> <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><a href=\"bookAction.do?method=updateBookAction&bookNumber=");
out.print(form.getBookNumber());
out.write("&number=");
out.print(number);
out.write("\">修改</a> \r\n");
out.write("\t\t <a href=\"javascript:deleteForm('");
out.print(form.getBookNumber());
out.write('\'');
out.write(',');
out.write('\'');
out.print(number);
out.write("')\">删除</a></td>\r\n");
out.write(" </tr>\r\n");
out.write("\t\t");
}
out.write("\r\n");
out.write(" </table>\r\n");
out.write(" <table width=\"718\" height=\"22\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr align=\"left\">\r\n");
out.write(" <td width=\"426\">");
out.print(number+1);
out.write('/');
out.print(maxPage);
out.write("页</td>\r\n");
out.write(" <td width=\"292\" align=\"right\">\r\n");
out.write("\t\t ");
if(number>0){
out.write("\r\n");
out.write(" <a href=\"bookAction.do?method=selectBookAction&number=");
out.print(number-1);
out.write("\">上一页</a> \r\n");
out.write(" ");
}
out.write("\r\n");
out.write("\t\t\t");
if(number<maxPage-1){
out.write("\r\n");
out.write(" <a href=\"bookAction.do?method=selectBookAction&number=");
out.print(number+1);
out.write("\">下一页</a></td>\r\n");
out.write(" ");
}
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\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 + =
减小字号Ctrl + -
显示快捷键?