资源简介
后台六大管理模块
1.管理员信息管理
2.考生信息管理
3.考生成绩查询
4.课程信息管理
5.套题信息管理
6.考试题题目管理
代码片段和文件信息
package com.wgh.action;
import java.util.List;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import com.wgh.actionForm.LessonForm;
import com.wgh.dao.LessonDAO;
public class Lesson extends Action {
private LessonDAO lessonDAO = null;
public Lesson() {
this.lessonDAO = new LessonDAO();
}
public ActionForward execute(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
String action = request.getParameter(“action“);
System.out.println(“获取的查询字符串:“ + action);
if (action == null || ““.equals(action)) {
return mapping.findForward(“error“);
} else if (“lessonQuery“.equals(action)) {
return lessonQuery(mapping form request response);
} else if (“lessonAdd“.equals(action)) {
return lessonAdd(mapping form request response);
} else if (“lessonDel“.equals(action)) {
return lessonDel(mapping form request response);
}else if(“selectLesson“.equals(action)){
return selectLesson(mapping form request response);
}else if(“ready“.equals(action)){
return ready(mapping form request response);
}
request.setAttribute(“error“ “操作失败!“);
return mapping.findForward(“error“);
}
// 查询课程信息
private ActionForward lessonQuery(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
request.setAttribute(“lessonQuery“ lessonDAO.query(0));
return mapping.findForward(“lessonQuery“);
}
// 添加课程
private ActionForward lessonAdd(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
LessonForm lessonForm = (LessonForm) form;
int ret = lessonDAO.insert(lessonForm);
System.out.println(“返回值ret:“ + ret);
if (ret == 1) {
return mapping.findForward(“lessonAdd“);
} else if (ret == 2) {
request.setAttribute(“error“ “该课程已经添加!“);
return mapping.findForward(“error“);
} else {
request.setAttribute(“error“ “添加课程失败!“);
return mapping.findForward(“error“);
}
}
// 删除课程
private ActionForward lessonDel(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
LessonForm lessonForm = (LessonForm) form;
int ret = lessonDAO.delete(lessonForm);
if (ret == 0) {
request.setAttribute(“error“ “删除课程失败!“);
return mapping.findForward(“error“);
} else {
return mapping.findForward(“lessonDel“);
}
}
//在线考试时选择课程
private ActionForward selectLesson(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
HttpSession session = request.getSession();
String stu=session.getAttribute(“student“).toString(); //获取准考证号
List list=lessonDAO.query(stu); //查询包括考试题目的课程列表,但不包括已经考过的科目
if(list.size()<1){
return mapping.findForward(“noenLesson“);
}else{
request.setAttribute(“lessonList“list);
return mapping.findForward(“selectLesson“);
}
}
//准备考试
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-12-28 19:57 Network online examination system\
文件 7129 2013-08-02 13:12 Network online examination system\db_exam.sql
目录 0 2013-08-02 13:11 Network online examination system\Exam\
文件 836 2013-08-02 10:02 Network online examination system\Exam\.classpath
文件 1037 2013-08-02 10:02 Network online examination system\Exam\.project
目录 0 2013-08-02 13:11 Network online examination system\Exam\.settings\
文件 503 2013-08-02 10:02 Network online examination system\Exam\.settings\.jsdtscope
文件 395 2013-08-02 10:02 Network online examination system\Exam\.settings\org.eclipse.jdt.core.prefs
文件 442 2013-08-02 10:02 Network online examination system\Exam\.settings\org.eclipse.wst.common.component
文件 345 2013-08-02 10:02 Network online examination system\Exam\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2013-08-02 10:02 Network online examination system\Exam\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2013-08-02 10:02 Network online examination system\Exam\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\classes\
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\classes\com\
文件 110 2013-08-02 10:08 Network online examination system\Exam\build\classes\com\connDB.properties
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\classes\com\wgh\
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\classes\com\wgh\action\
文件 3975 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\Lesson.class
文件 4326 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\Manager.class
文件 4145 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\Questions.class
文件 933 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\SelfRequestProcessor.class
文件 6982 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\StartExam.class
文件 5134 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\Student.class
文件 2535 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\StuResult.class
文件 3882 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\TaoTi.class
文件 1528 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\action\temp.class
目录 0 2013-08-02 13:11 Network online examination system\Exam\build\classes\com\wgh\actionForm\
文件 1320 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\actionForm\LessonForm.class
文件 1125 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\actionForm\ManagerForm.class
文件 599 2013-08-02 10:06 Network online examination system\Exam\build\classes\com\wgh\actionForm\MoreSelect.class
............此处省略170个文件信息
- 上一篇:android简易的拍卖系统设计
- 下一篇:ChinaVideo.apk
相关资源
- JavaWeb在线考试系统200891
- jsp+sql 在线考试系统
- 一个简单的基于jsp的在线考试系统
- 在线考试系统,JSP+TOMCAT+JAVABEAN+JQUER
- javaweb在线考试系统60796
- 基于java的在线考试系统
- jsp在线考试系统完整源代码
- 通用在线考试系统 JSP+Servlet+MySQL
- 基于Javaee ssh框架的在线考试系统毕业
- 在线考试系统_Swing版
- 在线考试系统 考务管理 swing java 源代
- JSP在线考试系统
- java+jsp+sql在线考试系统
- 在线考试系统 java源码
- java版学生在线考试系统完整源码
- java+mysql在线考试系统
- MVC3 层开发 在线考试系统(内容多,
- jsp ssh mvc java web j2ee bs 在线考试系统
- 基于Jsp 网络在线考试系统源码,Jav
- 2018 JAVA的在线考试系统(毕业设计
- java ee 在线考试系统-ssh框架
- ssm整合开发java在线考试系统通过mav
- java在线考试系统SSH框架源代码
- 毕业设计 jsp网络在线考试系统
- 在线考试系统 jsp
- Android在线考试系统源代码
- 在线考试系统-Swing
- 计算机专业毕业论文+英文文献+文献翻
- java网络在线考试系统源代码大全
- 在线考试系统(B/S模式)
评论
共有 条评论