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("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");
out.write(" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
out.write("\n");
out.write("<html>\n");
out.write(" <head>\n");
out.write(" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\n");
out.write(" <title>网上测试</title>\n");
out.write(" </head>\n");
out.write(" <body background=\"11.jpg\">\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(" <h3 align=\"center\">");
out.print(promt);
out.write("</h3>\n");
out.write(" ");
promt="本次测试包含填空题、多选题、单选题和判断题,请认真答题,祝你答题顺利";
out.write("\n");
out.write(" <h3>");
out.print(promt);
out.write("</h3>\n");
out.write(" <form action=\"result.jsp\">\n");
out.write(" ");
promt="填空题 每题10分\n";
out.write("\n");
out.write(" <h3>");
out.print(promt);
out.write("</h3>\n");
out.write(" 1.日心说是谁提出来的?<input type=\"text\" name=\"author\" value=\"\" size=\"10\" />\n");
out.write(" 2.太阳系有几大行星?<input type=\"text\" name=\"seven\" value=\"\" size=\"10\" />\n");
out.write(" ");
promt="\n 单选题 每题10分\n";
out.write("\n");
out.write(" <h3>");
out.print(promt);
out.write("</h3>\n");
out.write(" 1.以下哪位名人被称为开眼看世界的第一人?\n");
out.write(" <input type=\"radio\" name=\"group1\" value=\"林则徐\" />林则徐\n");
out.write(" <input type=\"radio\" name=\"group1\" value=\"魏源\" />魏源\n");
out.write(" <input type=\"radio\" name=\"group1\" value=\"董存瑞\" />董存瑞\n");
out.write(" 2.以下哪位名人是儒家学说的?\n");
out.write(" <input type=\"radio\" name=\"group2\" value=\"孔子\" />孔子\n");
out.write(" <input type=\"radio\" name=\"group2\" value=\"老子\" />老子\n");
out.write(" <input type=\"radio\" name=\"group2\" value=\"庄子\" />庄子\n");
out.write(" ");
promt="\n 多选题 每题20分 \n";
out.write("\n");
out.write(" <h3>");
out.print(promt);
out.write("</h3>\n");
out.write(" 1.以下那些名人是中国的?\n");
out.write(" <input type=\"checkbox\" name=\"checkbox1\" value=\"雨果\" />雨果\n");
out.write(" <input type=\"checkbox\" name=\"checkbox1\" value=\"三毛\" /> 三毛\n");
out.write(" <input type=\"checkbox\" name=\"checkbox1\" value=\"拉格朗日\" />拉格朗日\n");
out.write(" <input type=\"checkbox\" name=\"checkbox1\" value=\"茅盾\" />茅盾\n");
out.write(" 2.以下那些名人是外国的?\n");
out.write(" <input type=\"checkbox\" name=\"checkbox2\" value=\"雨果\" />雨果\n");
out.write(" <input type=\"checkbox\" name=\"checkbox2\" value=\"三毛\" /> 三毛\n");
out.write(" <input type=\"checkbox\" name=\"checkbox2\" value=\"拉格朗日\" />拉格朗日\n");
out.write(" <input type=\"checkbox\" name=\"checkbox2\" value=\"茅盾\" />茅盾\n");
out.write(" ");
promt="\n 判断题 每题10分\n";
out.write("\n");
out.write(" <h3>");
out.print(promt);
out.write("</h3>\n");
out.write(" 1.看见红灯要停止前进 <input type=\"text\" name=\"DM\" value=\"\" size=\"2\" />\n");
out.write(" 2.看见红灯要前进 <input type=\"text\" name=\"DM1\" value=\"\" size=\"2\" />\n");
out.write(" <center>\n");
out.write(" <input type=\"submit\" value=\"提交\" name=\"submit\" />\n");
out.write(" </center>\n");
out.write(" </form>\n");
out.write(" </body>\n");
out.write("</html>\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 {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
利用JSP技术编写一个网上测试程序
共39个文件
jsp:10个
xml:7个
class:4个
5星 · 超过95%的资源 需积分: 8 427 下载量 148 浏览量
2011-12-22
10:25:17
上传
评论 11
收藏 1.52MB ZIP 举报
温馨提示
利用JSP技术编写一个网上测试程序,包含填空题、多选题、单选题和判断题,可以实现在线测试以及在线评分。
资源推荐
资源详情
资源评论
收起资源包目录
Text1.zip (39个子文件)
Text1
test
build.xml 3KB
src
conf
MANIFEST.MF 25B
java
nbproject
build-impl.xml 46KB
private
private.xml 211B
private.properties 3KB
ant-deploy.xml 4KB
project.xml 685B
genfiles.properties 473B
project.properties 2KB
web
welcome.jsp 768B
WEB-INF
sun-web.xml 506B
result.jsp 2KB
11.jpg 760KB
index.jsp 458B
test.jsp 3KB
Text.jsp 492B
build
empty
generated
src
org
apache
jsp
Text_jsp.java 3KB
welcome_jsp.class.smap 78B
test_jsp.java 6KB
test_jsp.class.smap 201B
welcome_jsp.java 3KB
WEB_002dINF
welcome_jsp.class.smap 86B
welcome_jsp.java 3KB
Text_jsp.class.smap 85B
classes
org
apache
jsp
welcome_jsp.class 4KB
test_jsp.class 7KB
WEB_002dINF
welcome_jsp.class 4KB
Text_jsp.class 3KB
web
gfv3ee6.dpf 506B
META-INF
MANIFEST.MF 25B
welcome.jsp 768B
WEB-INF
classes
.netbeans_automatic_build 0B
.netbeans_update_resources 0B
sun-web.xml 506B
result.jsp 2KB
11.jpg 760KB
index.jsp 458B
test.jsp 3KB
Text.jsp 492B
共 39 条
- 1
fanfangogo90
- 粉丝: 2
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页