addbook_jsp.java
来自「图书管理系统。JSP+Struts(MVC框架)sql2000数据库」· Java 代码 · 共 283 行 · 第 1/2 页
JAVA
283 行
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 addBook_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");
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");
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(" </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");
out.write(" <body>\r\n");
out.write(" <div align=\"center\">\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../topOne.jsp", out, true);
out.write("\r\n");
out.write(" ");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../topTwo.jsp", out, true);
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\"> \r\n");
out.write(" 您当前的位置――图书管理――库存进书\r\n");
out.write(" </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>\r\n");
out.write(" <span class=\"STYLE4\">库存进书管理</span>\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </table>\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\" align=\"center\">\r\n");
out.write(" <table width=\"577\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <tr align=\"center\">\r\n");
out.write(" <td>\r\n");
out.write(" <table width=\"280\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <form name=\"form1\" method=\"post\" action=\"bookAction.do?method=forwardAddBookAction\" onSubmit=\"return selectBookNumber()\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"168\" align=\"right\">\r\n");
out.write(" <input type=\"text\" name=\"number\">\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"104\">\r\n");
out.write(" <input type=\"submit\" name=\"Submit\" value=\"按条形码查询\" class=\"btn_grey\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
out.write(" </form>\r\n");
out.write(" </table>\r\n");
out.write(" </td>\r\n");
out.write(" <td>\r\n");
out.write(" <table width=\"280\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n");
out.write(" <form name=\"form2\" method=\"post\" action=\"bookAction.do?method=forwardAddBookAction\" onSubmit=\"return selectBookName()\">\r\n");
out.write(" <tr>\r\n");
out.write(" <td width=\"168\" align=\"right\">\r\n");
out.write(" <input type=\"text\" name=\"name\">\r\n");
out.write(" </td>\r\n");
out.write(" <td width=\"60\">\r\n");
out.write(" <input type=\"submit\" name=\"Submit\" value=\"按书名查询\" class=\"btn_grey\">\r\n");
out.write(" </td>\r\n");
out.write(" </tr>\r\n");
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?