资源简介
基于jsp的在线考试系统,使用oracle数据库
代码片段和文件信息
package com.icar.action;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.icar.dao.objectBeanDao;
import com.icar.dao.impl.objectBeanDaoImpl;
import com.icar.entity.objectProblem;
public class AddobjectAction extends HttpServlet {
/**
* The doGet method of the servlet.
*
* This method is called when a form has its tag value method equals to get.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doGet(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setContentType(“text/html;charset=utf-8“);
String courseName=request.getParameter(“courseName“);
String info=request.getParameter(“info“);
String answer=request.getParameter(“answer“);
if(info.equals(“请输入题目“.trim())||answer.equals(“请输入正确答案“.trim())){
request.getRequestDispatcher(“control_error.jsp“).forward(request response);
}else{
objectProblem op=new objectProblem();
op.setCourseName(courseName);
op.setAnswer(answer);
op.setInformation(info);
System.out.println(op.toString());
objectBeanDao obd=new objectBeanDaoImpl();
obd.save(op);
request.getRequestDispatcher(“control_seccess.jsp“).forward(request response);
}
}
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
doGet(requestresponse);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-03-17 21:33 OnlineExaminationSystem\
文件 587 2012-10-11 20:30 OnlineExaminationSystem\.classpath
目录 0 2013-03-17 21:33 OnlineExaminationSystem\.myeclipse\
文件 342 2012-12-27 22:48 OnlineExaminationSystem\.myme
文件 240 2012-10-11 20:31 OnlineExaminationSystem\.mystrutsdata
文件 1512 2012-10-11 20:31 OnlineExaminationSystem\.project
目录 0 2013-03-17 21:33 OnlineExaminationSystem\.settings\
文件 500 2012-09-17 21:19 OnlineExaminationSystem\.settings\.jsdtscope
文件 330 2012-09-17 21:19 OnlineExaminationSystem\.settings\org.eclipse.jdt.core.prefs
文件 49 2012-09-17 21:19 OnlineExaminationSystem\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2012-09-17 21:19 OnlineExaminationSystem\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\
文件 2469 2012-09-27 02:17 OnlineExaminationSystem\WebRoot\AnswerOnExam.jsp
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\me
文件 36 2012-09-17 21:19 OnlineExaminationSystem\WebRoot\me
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\WEB-INF\
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\WEB-INF\classes\
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\
目录 0 2013-03-17 21:33 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\
文件 2235 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\Addob
文件 2641 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AddSingleAction.class
文件 1916 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AddUserAction.class
文件 2843 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AlertPasswordAction.class
文件 3808 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AnswerOnExamAction.class
文件 3400 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AnswerQuestionAction.class
文件 2512 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\AutoPageAction.class
文件 1861 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\DeletePageAction.class
文件 1811 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\DeleteUserAction.class
文件 4267 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\ExamCheckAction.class
文件 3284 2013-03-14 21:55 OnlineExaminationSystem\WebRoot\WEB-INF\classes\com\icar\action\ExamSearchAction.class
............此处省略169个文件信息
- 上一篇:Java发送HTTP请求GET/POST测试
- 下一篇:聚合SDK的jar包
评论
共有 条评论