資源簡介
(1)單擊“管理員信息管理”按鈕,對(duì)管理員信息進(jìn)行添加、修改及刪除操作。
(2)單擊“考生信息管理”按鈕,對(duì)考生信息進(jìn)行查看及刪除操作。
注意:如果該考生已經(jīng)考過試,那么該考生的信息無法刪除。
(3)單擊“考生成績查詢”按鈕,對(duì)所有考生的成績進(jìn)行查詢操作。
(4)單擊“課程信息管理”按鈕,對(duì)課程信息進(jìn)行添加、查看及刪除操作。
(5)單擊“套題信息管理”按鈕,對(duì)套題信息進(jìn)行添加、修改及刪除操作。
(6)單擊“考試題目管理”按鈕,對(duì)考試題目信息進(jìn)行添加、修改及刪除操作。
(7)單擊“退出后臺(tái)管理”按鈕,退出后臺(tái)管理操作界面。
數(shù)據(jù)庫安裝 ; c+ e+ d+ N; D
(1)將Database文件夾中的擴(kuò)展名為db_netExam_Data.MDF和db_netExam_Log.LDF的兩個(gè)文件拷貝到SQL Server安裝路徑下的Data文件夾中。
(2)打開SQL Server 2005中的“企業(yè)管理器”,然后展開本地服務(wù)器,在“數(shù)據(jù)庫”數(shù)據(jù)項(xiàng)上單擊鼠標(biāo)右鍵,在彈出的快捷菜單中選擇“所有任務(wù)”/“附加數(shù)據(jù)庫”菜單項(xiàng)。
(3)將彈出“附加數(shù)據(jù)庫”對(duì)話框,在該對(duì)話框中單擊【 】按鈕,選擇所要附加數(shù)據(jù)庫的db_netExam_Data.MDF文件,單擊【確定】按鈕,即可完成數(shù)據(jù)庫的附加操作。

代碼片段和文件信息
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?(“l(fā)essonQuery“.equals(action))?{
return?lessonQuery(mapping?form?request?response);
}?else?if?(“l(fā)essonAdd“.equals(action))?{
return?lessonAdd(mapping?form?request?response);
}?else?if?(“l(fā)essonDel“.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(“l(fā)essonQuery“?lessonDAO.query(0));
return?mapping.findForward(“l(fā)essonQuery“);
}
//?添加課程
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(“l(fā)essonAdd“);
}?else?if?(ret?==?2)?{
request.setAttribute(“error“?“該課程已經(jīng)添加!“);
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(“l(fā)essonDel“);
}
}
//在線考試時(shí)選擇課程
private?ActionForward?selectLesson(ActionMapping?mapping?ActionForm?form
HttpServletRequest?request?HttpServletResponse?response)?{?
HttpSession?session?=?request.getSession();
String?stu=session.getAttribute(“student“).toString(); //獲取準(zhǔn)考證號(hào)
List?list=lessonDAO.query(stu); //查詢包括考試題目的課程列表,但不包括已經(jīng)考過的科目
if(list.size()<1){
return?mapping.findForward(“noenLesson“);
}else{
request.setAttribute(“l(fā)essonList“l(fā)ist);
return?mapping.findForward(“selectLesson“);
}
}
//準(zhǔn)備考試
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2013-08-02?13:15??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\
?????目錄???????????0??2013-08-02?13:11??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\
?????文件?????????836??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.classpath
?????文件????????1037??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.project
?????目錄???????????0??2013-08-02?13:11??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\
?????文件?????????503??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\.jsdtscope
?????文件?????????395??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\org.eclipse.jdt.core.prefs
?????文件?????????442??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\org.eclipse.wst.common.component
?????文件?????????345??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2013-08-02?10:02??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2013-08-02?13:11??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\
?????目錄???????????0??2013-08-02?13:11??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\CSS\
?????文件????????1979??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\CSS\st
?????目錄???????????0??2013-08-02?13:11??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\
?????文件???????92160??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\Thumbs.db
?????文件?????????587??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\add.gif
?????文件??????????49??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\bg_01.gif
?????文件??????115145??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\default_bottom.JPG
?????文件??????227556??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\default_mid.JPG
?????文件??????105753??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\default_top.jpg
?????文件???????19902??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\error.jpg
?????文件?????????173??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\f_ico.gif
?????文件???????78893??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\login_bottom.jpg
?????文件???????52384??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\login_mid.jpg
?????文件??????102349??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\login_top.jpg
?????文件??????????65??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\m_ico.gif
?????文件??????????59??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\m_ico1.gif
?????文件???????76626??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\m_login.jpg
?????文件???????89527??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\m_top.jpg
?????文件????????3069??2013-08-02?10:04??javaweb在線測試系統(tǒng)源碼項(xiàng)目+數(shù)據(jù)庫文件(導(dǎo)入可直接使用)\Exam\WebContent\Images\seedPwd.gif
............此處省略170個(gè)文件信息
評(píng)論
共有 條評(píng)論