• 大小: 1.52MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-29
  • 语言: Java
  • 标签:

资源简介

利用JSP技术编写一个网上测试程序,包含填空题、多选题、单选题和判断题,可以实现在线测试以及在线评分。

资源截图

代码片段和文件信息

package org.apache.jsp;

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

public final class test_jsp extends org.apache.jasper.runtime.HttpJspbase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

  private static java.util.Vector _jspx_dependants;

  private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector;

  public object getDependants() {
    return _jspx_dependants;
  }

  public void _jspService(HttpServletRequest request HttpServletResponse response)
        throws java.io.IOException ServletException {

    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 {
      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;
      _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute(“com.sun.appserv.jsp.resource.injector“);

      out.write(“\n“);
      out.write(“ \n“);
      out.write(“\n“);
      out.write(“      out.write(“   \“http://www.w3.org/TR/html4/loose.dtd\“>\n“);
      out.write(“\n“);
      out.write(“\n“);
      out.write(“    \n“);
      out.write(“        ta http-equiv=\“Content-Type\“ content=\“text/html; charset=gb2312\“>\n“);
      out.write(“        tle>网上测试tle>\n“);
      out.write(“    \n“);
      out.write(“    \n“);
      out.write(“        “);
 response.setContentType(“text/html;charset=gb2312“);
       request.setCharacterEncoding(“gb2312“);//解决编码问题
           String name=(String)request.getParameter(“UserName“);
           String promt=“你好,“+name+“! 欢迎进入J2EE测试系统“;
        
      out.write(“\n“);
      out.write(“        “);
      out.print(promt);
      out.write(“\n“);
      out.write(“         “);

           promt=“本次测试包含填空题、多选题、单选题和判断题,请认真答题,祝你答题顺利“;
     
      out.write(“\n“);
      out.write(“         

“);
      out.print(promt);
      out.write(“

\n“);
      out.write(“         \n“);
      out.write(“         “);
 promt=“填空题  每题10分\n“; 
      out.write(“\n“);
      out.write(“         

“);
      out.print(promt);
      out.write(“

\n“);
      out.write(“         1.日心说是谁提出来的?

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-12-19 13:07  Text1\
     目录           0  2011-12-18 21:16  Text1\build\
     文件        3491  2011-12-18 21:12  Text1\build.xml
     目录           0  2011-12-18 21:16  Text1\build\empty\
     目录           0  2011-12-18 21:16  Text1\build\generated\
     目录           0  2011-12-18 21:16  Text1\build\generated\classes\
     目录           0  2011-12-18 21:16  Text1\build\generated\classes\org\
     目录           0  2011-12-18 21:16  Text1\build\generated\classes\org\apache\
     目录           0  2011-12-19 14:15  Text1\build\generated\classes\org\apache\jsp\
     文件        6921  2011-12-19 14:15  Text1\build\generated\classes\org\apache\jsp\test_jsp.class
     文件        3566  2011-12-18 21:17  Text1\build\generated\classes\org\apache\jsp\Text_jsp.class
     目录           0  2011-12-19 13:00  Text1\build\generated\classes\org\apache\jsp\WEB_002dINF\
     文件        3926  2011-12-19 13:00  Text1\build\generated\classes\org\apache\jsp\WEB_002dINF\welcome_jsp.class
     文件        3943  2011-12-19 13:37  Text1\build\generated\classes\org\apache\jsp\welcome_jsp.class
     目录           0  2011-12-18 21:16  Text1\build\generated\src\
     目录           0  2011-12-18 21:16  Text1\build\generated\src\org\
     目录           0  2011-12-18 21:16  Text1\build\generated\src\org\apache\
     目录           0  2011-12-19 14:15  Text1\build\generated\src\org\apache\jsp\
     文件         201  2011-12-19 14:15  Text1\build\generated\src\org\apache\jsp\test_jsp.class.smap
     文件        6498  2011-12-19 14:15  Text1\build\generated\src\org\apache\jsp\test_jsp.java
     文件          85  2011-12-18 21:17  Text1\build\generated\src\org\apache\jsp\Text_jsp.class.smap
     文件        2645  2011-12-18 21:17  Text1\build\generated\src\org\apache\jsp\Text_jsp.java
     目录           0  2011-12-19 13:00  Text1\build\generated\src\org\apache\jsp\WEB_002dINF\
     文件          86  2011-12-19 13:00  Text1\build\generated\src\org\apache\jsp\WEB_002dINF\welcome_jsp.class.smap
     文件        3024  2011-12-19 13:00  Text1\build\generated\src\org\apache\jsp\WEB_002dINF\welcome_jsp.java
     文件          78  2011-12-19 13:37  Text1\build\generated\src\org\apache\jsp\welcome_jsp.class.smap
     文件        3055  2011-12-19 13:37  Text1\build\generated\src\org\apache\jsp\welcome_jsp.java
     目录           0  2011-12-19 13:07  Text1\build\web\
     文件      777835  2011-12-19 13:07  Text1\build\web\11.jpg
     文件         506  2011-12-19 14:18  Text1\build\web\gfv3ee6.dpf
     文件         458  2011-12-18 21:16  Text1\build\web\index.jsp
............此处省略34个文件信息

评论

共有 条评论

相关资源