choice_jsp.java

来自「Internet 开发技术分章节代码和自己完成的课程设计全代码(在zuoye文件」· Java 代码 · 共 113 行

JAVA
113
字号
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;

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

  private static java.util.List _jspx_dependants;

  public Object 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,
      			null, 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("<html><head><title>购书页面</title></head><body>\r\n");
      out.write("<center><H2><B>选书,点击\"购书\"填加到购物车</B></H2></center><hr>\r\n");
      out.write("<form action=\"AddCar_Servlet\" method=post>\r\n");
      out.write("<table width=\"80%\" border=\"1\">\r\n");

  String s0="ID:0<BR>书名: JSP实用教程<BR>出版社: 清华大学出版社<BR>价格: 32.00元";	 
  String s1="ID:1<BR>书名: 面向对象程序设计<BR>出版社: 西安电子科技大学出版社<BR>价格: 28.00元";
  String s2="ID:2<BR>书名: XML基础教程<BR>出版社: 清华大学出版社价格: 21.00元<BR>";
  String s3="ID:3<BR>书名: 精通Java中间件编程<BR>出版社: 清华大学出版社<BR>价格: 21.00元";
  String s4="ID:4<BR>书名: 计算机图形学<BR>出版社: 西安电子科技大学出版社<BR>价格: 25.00元";
  String s5="ID:5<BR>书名: 人工智能原理与技术<BR>出版社: 西安电子科技大学出版社<BR>价格: 20.00元";	  
  
      out.write("\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s0);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s0);
      out.write("</td></tr>\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s1);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s1);
      out.write("</td></tr>\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s2);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s2);
      out.write("</td></tr>\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s3);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s3);
      out.write("</td></tr>\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s4);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s4);
      out.write("</td></tr>\r\n");
      out.write(" <tr><td><input type=\"checkbox\" name=\"id\" value=\"");
      out.print(s5);
      out.write('"');
      out.write('>');
      out.write(' ');
      out.print(s5);
      out.write("</td></tr>\r\n");
      out.write("<tr><td><input type=submit value=\"购书\" name=\"mybook\"></td></tr> \r\n");
      out.write("</table>\r\n");
      out.write("</form></body></html>\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 + -
显示快捷键?