updatebook_jsp.java

来自「图书管理系统。JSP+Struts(MVC框架)sql2000数据库」· Java 代码 · 共 218 行

JAVA
218
字号
package org.apache.jsp.book;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.actionForm.BookSortForm;
import com.actionForm.BookForm;
import java.util.List;

public final class updateBook_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");
      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');

BookForm form=(BookForm)request.getAttribute("form");

      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");
      out.write("\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("<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\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您当前的位置――图书管理――修改图书</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><span class=\"STYLE4\">修改图书信息</span></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\" ><div align=\"center\">\r\n");
      out.write("      <form name=\"form\" method=\"post\" action=\"\" onSubmit=\"return checkEmpty(form)\">\r\n");
      out.write("\r\n");
      out.write("            <br><table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolordark=\"#819BBC\" bordercolorlight=\"#FFFFFF\">\r\n");
      out.write("              <tr  align=\"center\">\r\n");
      out.write("                <td height=\"30\" width=\"100\"  bgcolor=\"#83B9FF\"  class=\"word_white\">书号</td>\r\n");
      out.write("                <td width=\"150\"><div align=\"left\">&nbsp;&nbsp;");
      out.print(form.getBookNumber());
      out.write("<input type=\"hidden\" name=\"bookNumber\" value=\"");
      out.print(form.getBookNumber());
      out.write("\"><input type=\"hidden\" name=\"number\" value=\"");
      out.print(request.getParameter("number"));
      out.write("\"></div></td>\r\n");
      out.write("                <td width=\"100\" align=\"center\" bgcolor=\"#83B9FF\"  class=\"word_white\">条形码</td>\r\n");
      out.write("                <td width=\"150\" ><input type=\"text\" name=\"lineNumber\" value=\"");
      out.print(form.getLineNumber());
      out.write("\"></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              <tr  align=\"center\">\r\n");
      out.write("                <td   height=\"30\" bgcolor=\"#83B9FF\"  class=\"word_white\">书名</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"bookName\" value=\"");
      out.print(form.getBookName());
      out.write("\"></td>\r\n");
      out.write("                <td align=\"center\" bgcolor=\"#83B9FF\"  class=\"word_white\">作者</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"author\" value=\"");
      out.print(form.getAuthor());
      out.write("\"></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              <tr align=\"center\">\r\n");
      out.write("                <td height=\"30\"  bgcolor=\"#83B9FF\"  class=\"word_white\">出版社</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"publish\" value=\"");
      out.print(form.getPublish());
      out.write("\"></td>\r\n");
      out.write("                <td align=\"center\" bgcolor=\"#83B9FF\"  class=\"word_white\">出版次数</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"publishNumber\" value=\"");
      out.print(form.getPublishNumber());
      out.write("\"></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              <tr  align=\"center\">\r\n");
      out.write("                <td  height=\"30\" bgcolor=\"#83B9FF\"  class=\"word_white\">书的类别</td>\r\n");
      out.write("                <td>\r\n");
      out.write("                  <div align=\"left\">&nbsp;\r\n");
      out.write("                    <select name=\"sortNumber\">\r\n");
      out.write("\r\n");
      out.write("                    ");

                List sortList=bookSortDao.selectbookSort();
                for(int sort=0;sort<sortList.size();sort++){
                BookSortForm sortForm=(BookSortForm)sortList.get(sort);
                  
      out.write("\r\n");
      out.write("                    <option value=\"");
      out.print(sortForm.getSortNumber());
      out.write("\" style=\"background:#00FFFF\" ");
if(form.getSortNumber().equals(sortForm.getSortNumber())){
      out.write("selected");
}
      out.write('>');
      out.print(sortForm.getSortName());
      out.write("</option>\r\n");
      out.write("                       ");
}
      out.write("\r\n");
      out.write("                    </select>\r\n");
      out.write("\r\n");
      out.write("                </div></td>\r\n");
      out.write("                <td bgcolor=\"#83B9FF\" class=\"word_white\">入库价格</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"inPirce\" value=\"");
      out.print(form.getInPirce());
      out.write("\"></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              <tr  align=\"center\">\r\n");
      out.write("                <td  height=\"30\" bgcolor=\"#83B9FF\"  class=\"word_white\">售出单价</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"singlePirce\"  value=\"");
      out.print(form.getSinglePirce());
      out.write("\"></td>\r\n");
      out.write("                <td align=\"center\" bgcolor=\"#83B9FF\"  class=\"word_white\">入库数量</td>\r\n");
      out.write("                <td><input type=\"text\" name=\"bookSum\"  value=\"");
      out.print(form.getBookSum());
      out.write("\"></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("              <tr align=\"center\">\r\n");
      out.write("                <td  height=\"30\"  bgcolor=\"#83B9FF\"  class=\"word_white\">操作员</td>\r\n");
      out.write("                <td><div align=\"left\">&nbsp;&nbsp;");
      out.print(form.getMan());
      out.write("\r\n");
      out.write("                    <input type=\"hidden\" name=\"man\" value=\"");
      out.print(form.getMan());
      out.write("\">\r\n");
      out.write("                </div></td>\r\n");
      out.write("                <td  bgcolor=\"#83B9FF\"  class=\"word_white\">入库时间</td>\r\n");
      out.write("                <td><div align=\"left\">&nbsp;&nbsp;");
      out.print(form.getCreatime());
      out.write("\r\n");
      out.write("                    <input type=\"hidden\" name=\"creatime\" value=\"");
      out.print(form.getCreatime());
      out.write("\">\r\n");
      out.write("                </div></td>\r\n");
      out.write("              </tr>\r\n");
      out.write("            </table>\r\n");
      out.write("\t\t\t<br>\r\n");
      out.write("\r\n");
      out.write("        <input type=\"submit\" name=\"Submit2\" value=\"修改\">&nbsp;&nbsp;&nbsp;\r\n");
      out.write("        <input type=\"reset\" name=\"Submit\" value=\"清除\">&nbsp;&nbsp;&nbsp;\r\n");
      out.write("        <input type=\"button\" name=\"back\" value=\"返回\" onClick=\"javascript:history.go(-1);\">\r\n");
      out.write("      </form>\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 + -
显示快捷键?