⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 insertreader_jsp.java

📁 图书管理系统。JSP+Struts(MVC框架)sql2000数据库
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
package org.apache.jsp.reader;

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

public final class insertReader_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.Vector _jspx_dependants;

  static {
    _jspx_dependants = new java.util.Vector(1);
    _jspx_dependants.add("/WEB-INF/struts-html.tld");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_html;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_form_onsubmit_action;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_text_property_nobody;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_html_text_size_property_nobody;

  public java.util.List getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _jspx_tagPool_html_html = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _jspx_tagPool_html_form_onsubmit_action = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _jspx_tagPool_html_text_property_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
    _jspx_tagPool_html_text_size_property_nobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _jspx_tagPool_html_html.release();
    _jspx_tagPool_html_form_onsubmit_action.release();
    _jspx_tagPool_html_text_property_nobody.release();
    _jspx_tagPool_html_text_size_property_nobody.release();
  }

  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");
      com.tool.ShowTime showTime = null;
      synchronized (request) {
        showTime = (com.tool.ShowTime) _jspx_page_context.getAttribute("showTime", PageContext.REQUEST_SCOPE);
        if (showTime == null){
          showTime = new com.tool.ShowTime();
          _jspx_page_context.setAttribute("showTime", showTime, PageContext.REQUEST_SCOPE);
        }
      }
      com.dao.ReaderDao readerDao = null;
      synchronized (request) {
        readerDao = (com.dao.ReaderDao) _jspx_page_context.getAttribute("readerDao", PageContext.REQUEST_SCOPE);
        if (readerDao == null){
          readerDao = new com.dao.ReaderDao();
          _jspx_page_context.setAttribute("readerDao", readerDao, PageContext.REQUEST_SCOPE);
        }
      }
      com.dao.TypeReaderDao typeReaderDao = null;
      synchronized (request) {
        typeReaderDao = (com.dao.TypeReaderDao) _jspx_page_context.getAttribute("typeReaderDao", PageContext.REQUEST_SCOPE);
        if (typeReaderDao == null){
          typeReaderDao = new com.dao.TypeReaderDao();
          _jspx_page_context.setAttribute("typeReaderDao", typeReaderDao, PageContext.REQUEST_SCOPE);
        }
      }
      com.tool.Chinese chinese = null;
      synchronized (request) {
        chinese = (com.tool.Chinese) _jspx_page_context.getAttribute("chinese", PageContext.REQUEST_SCOPE);
        if (chinese == null){
          chinese = new com.tool.Chinese();
          _jspx_page_context.setAttribute("chinese", chinese, PageContext.REQUEST_SCOPE);
        }
      }
      //  html:html
      org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_0 = (org.apache.struts.taglib.html.HtmlTag) _jspx_tagPool_html_html.get(org.apache.struts.taglib.html.HtmlTag.class);
      _jspx_th_html_html_0.setPageContext(_jspx_page_context);
      _jspx_th_html_html_0.setParent(null);
      int _jspx_eval_html_html_0 = _jspx_th_html_html_0.doStartTag();
      if (_jspx_eval_html_html_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\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("  <script language=\"javascript\" type=\"\">\r\n");
          out.write("function ChangeItem_C(){\r\n");
          out.write("var realerType=readerForm.realerType.value;\r\n");
          out.write("  window.location.href=\"readerAction.do?method=insertReaderAction&realerType=\"+realerType;\r\n");
          out.write("}\r\n");
          out.write("</script>\r\n");
          out.write("  ");

  float price = 0;
  String readerTypeName = "A类";
  String timeLater="00-00-00";
  if (request.getParameter("realerType")!= null) {
    readerTypeName = chinese.toChinese(request.getParameter("realerType"));
    }
    TypeReaderForm typeReaderForm = new TypeReaderForm();
    typeReaderForm.setTypeName(readerTypeName);
    TypeReaderForm form1 = typeReaderDao.selectOneTypeReader(typeReaderForm);
    price = form1.getPrice();
    String overTime=form1.getSaveTime();
   if(overTime.equals("一年")){
   timeLater=showTime.showLaterTime(365);
   }
   if(overTime.equals("半年")){
   timeLater=showTime.showLaterTime(180);
   }
   if(overTime.equals("三个月")){
   timeLater=showTime.showLaterTime(90);
   }
    if(overTime.equals("二个月")){
   timeLater=showTime.showLaterTime(60);
   }
    if(overTime.equals("一个月")){
   timeLater=showTime.showLaterTime(30);
   }


          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\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\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><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("            ");
          //  html:form
          org.apache.struts.taglib.html.FormTag _jspx_th_html_form_0 = (org.apache.struts.taglib.html.FormTag) _jspx_tagPool_html_form_onsubmit_action.get(org.apache.struts.taglib.html.FormTag.class);
          _jspx_th_html_form_0.setPageContext(_jspx_page_context);
          _jspx_th_html_form_0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_html_html_0);
          _jspx_th_html_form_0.setAction("readerAction.do?method=insertReaderAction");
          _jspx_th_html_form_0.setOnsubmit("return addRead(readerForm)");
          int _jspx_eval_html_form_0 = _jspx_th_html_form_0.doStartTag();
          if (_jspx_eval_html_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write(" <br>\r\n");
              out.write("              <table width=\"540\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#FFFFFF\" bordercolorlight=\"#FFFFFF\" bordercolordark=\"#819BBC\">\r\n");
              out.write("                <tr align=\"center\">\r\n");
              out.write("                  <td height=\"30\" width=\"101\" bgcolor=\"#83B9FF\" class=\"word_white\">读者类别</td>\r\n");
              out.write("                  <td width=\"168\"><div align=\"left\">\r\n");
              out.write("                      <select name=\"realerType\" onChange=\"ChangeItem_C()\">\r\n");
              out.write("                        ");

                        List list = typeReaderDao.selectOneTypeReader();
                        for (int i = 0; i < list.size(); i++) {
                          TypeReaderForm form = (TypeReaderForm) list.get(i);
                          
              out.write("\r\n");
              out.write("                        <option value=\"");
              out.print(form.getTypeName());
              out.write("\"   ");
if(readerTypeName .equals(form.getTypeName())){
              out.write("selected");
}
              out.write('>');
              out.print(form.getTypeName());
              out.write(" </option>\r\n");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -