selectaii_jsp.java
来自「图书管理系统。JSP+Struts(MVC框架)sql2000数据库」· Java 代码 · 共 141 行
JAVA
141 行
package org.apache.jsp.book;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.actionForm.BookForm;
import com.actionForm.BookSortForm;
public final class selectAII_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\r\n\r\n");
com.dao.BookSortDao bookSortDao = null;
synchronized (request) {
bookSortDao = (com.dao.BookSortDao) _jspx_page_context.getAttribute("bookSortDao", PageContext.REQUEST_SCOPE);
if (bookSortDao == null){
bookSortDao = new com.dao.BookSortDao();
_jspx_page_context.setAttribute("bookSortDao", bookSortDao, PageContext.REQUEST_SCOPE);
}
}
out.write('\r');
out.write('\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<html>\r\n <head>\r\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n <title>翼飞图书管理系统----图书管理</title>\r\n </head>\r\n");
BookForm bookForm = new BookForm();
BookForm form = null;
String message = "";
if (request.getParameter("bookNumber") != null) {
bookForm.setBookNumber(request.getParameter("bookNumber"));
form = bookDao.selectBookNumbers(bookForm);
message = "您已成功添加!!!";
}
if (request.getParameter("number") != null) { //取得数的条形码
bookForm.setLineNumber(request.getParameter("number"));
form = bookDao.selectlineNumber(bookForm);
}
if (request.getParameter("name") != null) { //取得书的名称
bookForm.setBookName(request.getParameter("name"));
form = bookDao.selectBookName(bookForm);
}
out.write("\r\n <body>\r\n <div align=\"center\">\r\n ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../topOne.jsp", out, true);
out.write("\r\n ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../topTwo.jsp", out, true);
out.write("\r\n <table width=\"799\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"Images/upPlace.jpg\">\r\n <tr>\r\n <td height=\"21\" class=\"word_black\"> \r\n 您当前的位置----图书管理----库存进书\r\n </td>\r\n </tr>\r\n </table>\r\n <table width=\"799\" height=\"28\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"Images/operationOne.jpg\">\r\n <tr align=\"center\">\r\n <td>\r\n <span class=\"style2\">***************库存进书管理*******************</span>\r\n </td>\r\n </tr>\r\n </table>\r\n <table width=\"799\" height=\"457\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"tableBorder_B_dashed\">\r\n <tr>\r\n <td valign=\"top\" align=\"center\">\r\n <table width=\"577\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <tr align=\"center\">\r\n <td>\r\n <table width=\"280\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">\r\n <form name=\"form1\" method=\"post\" action=\"bookAction.do?method=forwardAddBookAction\" onSubmit=\"return selectlineNumber()\">\r\n");
out.write(" <tr>\r\n <td width=\"168\" align=\"right\">\r\n <input type=\"text\" name=\"number\">\r\n </td>\r\n <td width=\"104\">\r\n <input type=\"submit\" name=\"Submit\" value=\"按条形码查询\" class=\"btn_grey\">\r\n </td>\r\n </tr>\r\n </form>\r\n </table>\r\n </td>\r\n <td>\r\n <table width=\"280\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n <form name=\"form2\" method=\"post\" action=\"bookAction.do?method=forwardAddBookAction\" onSubmit=\"return selectBookName()\">\r\n <tr>\r\n <td width=\"168\" align=\"right\">\r\n <input type=\"text\" name=\"name\">\r\n </td>\r\n <td width=\"60\">\r\n <input type=\"submit\" name=\"Submit\" value=\"按书名查询\" class=\"btn_grey\">\r\n </td>\r\n");
out.write(" </tr>\r\n </form>\r\n </table>\r\n </td>\r\n </tr>\r\n </table>\r\n ");
if (form != null) {
BookSortForm sortForm = new BookSortForm();
sortForm.setSortNumber(form.getSortNumber());
BookSortForm bookSortForm = (BookSortForm) bookSortDao.selectbookSort(sortForm);
out.write("\r\n <table width=\"500\" border=\"0\">\r\n <tr>\r\n <td>查询结果如下:</td>\r\n </tr>\r\n </table>\r\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolordark=\"#819BBC\" bordercolorlight=\"#FFFFFF\">\r\n <tr align=\"center\">\r\n <td width=\"100\" height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">书号</td>\r\n <td width=\"150\" align=\"left\"> \r\n");
out.print(form.getBookNumber());
out.write(" </td>\r\n <td width=\"100\" align=\"center\" bgcolor=\"#83B9FF\" class=\"word_white\">条形码</td>\r\n <td width=\"150\" align=\"left\"> \r\n");
out.print(form.getLineNumber());
out.write(" </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">书名</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getBookName());
out.write(" </td>\r\n <td align=\"center\" bgcolor=\"#83B9FF\" class=\"word_white\">作者</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getAuthor());
out.write(" </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">出版社</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getPublish());
out.write(" </td>\r\n <td align=\"center\" bgcolor=\"#83B9FF\" class=\"word_white\">出版次数</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getPublishNumber());
out.write(" 次\r\n </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">书的类别</td>\r\n <td>\r\n <div align=\"left\"> \r\n");
out.print(bookSortForm.getSortName());
out.write(" </div>\r\n </td>\r\n <td bgcolor=\"#83B9FF\" class=\"word_white\">存放位置</td>\r\n <td align=\"left\"> \r\n");
out.print(bookSortForm.getPlaceName());
out.write(" </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">入库单价</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getInPirce());
out.write(" 元\r\n </td>\r\n <td align=\"center\" bgcolor=\"#83B9FF\" class=\"word_white\">售出单价</td>\r\n <td align=\"left\"> \r\n");
out.print(form.getSinglePirce());
out.write(" 元\r\n </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">入库数量</td>\r\n <td>\r\n <div align=\"left\"> \r\n");
out.print(form.getBookSum());
out.write(" 本\r\n </div>\r\n </td>\r\n <td bgcolor=\"#83B9FF\" class=\"word_white\">入库时间</td>\r\n <td>\r\n <div align=\"left\"> \r\n");
out.print(form.getCreatime());
out.write(" </div>\r\n </td>\r\n </tr>\r\n <tr align=\"center\">\r\n <td height=\"30\" bgcolor=\"#83B9FF\" class=\"word_white\">入库员</td>\r\n <td colspan=\"3\">\r\n <div align=\"left\"> \r\n");
out.print(form.getMan());
out.write(" </div>\r\n </td>\r\n </tr>\r\n </table>\r\n\r\n");
out.print(message);
out.write(" ");
}
out.write("\r\n </td>\r\n </tr>\r\n </table>\r\n ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../bottom.jsp", out, true);
out.write("\r\n </div>\r\n </body>\r\n</html>\r\n\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 + -
显示快捷键?