freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于web的網(wǎng)絡(luò)在線考試系統(tǒng)的設(shè)計(jì)與實(shí)現(xiàn)說明書-資料下載頁

2025-05-07 18:58本頁面
  

【正文】 IdArray(){ return delIdArray。 } public void setDelIdArray(String[] delIdArray){ =delIdArray。 } ? } b) 創(chuàng)建考生信息模塊的 Action 類 考生信息模塊的 Action 實(shí)現(xiàn)類 Student 繼承了 Action 類。在該類中,首先需要在該類的構(gòu)造方法中分別實(shí)例化考生信息模塊的 StudentDAO 類。 Action 實(shí)現(xiàn)類的主要方法是 execute(),該方法會(huì)被自動(dòng)執(zhí)行,這個(gè)方法本身沒有具體的事務(wù),它是根據(jù) HttpServletRequest 的 getParameter()方法獲取的 action 參數(shù)值執(zhí)行相應(yīng)方法的??忌畔⒛K的 Action 實(shí)現(xiàn)類的關(guān)鍵代碼如下: public class Student extends Action { ? public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String action = (action)。 if (studentQuery.equals(action)) { return studentQuery(mapping, form, request, response)。 } else if (login.equals(action)) { return studentLogin(mapping, form, request, response)。 } else if (studentAdd.equals(action)) { return studentAdd(mapping, form, request, response)。 } else if (studentDel.equals(action)) { return studentDel(mapping, form, request, response)。 } else if (modifyQuery.equals(action)) { return modifyQuery(mapping, form, request, response)。 } else if (studentModify.equals(action)) { return studentModify(mapping, form, request, response)。 }else if(seekPwd1.equals(action)){ return seekPwd1(mapping,form,request,response)。 基于 Web的網(wǎng)絡(luò)在線考試系統(tǒng)的設(shè)計(jì) 與實(shí)現(xiàn) 16 }else if(seekPwd2.equals(action)){ return seekPwd2(mapping,form,request,response)。 }else{ (error,您的操作有誤! )。//將錯(cuò)誤信息保存到error 中 return (error)。 //轉(zhuǎn)到顯示錯(cuò)誤信息的頁面 } } ? //此處省略了該類中其他方法,這些方法將在后面的具體過程中給出 } 考生注冊(cè)的實(shí)現(xiàn)過程 運(yùn)行網(wǎng)絡(luò)在線考試系統(tǒng),首先進(jìn)入的是考生登錄頁面,在該頁面中單擊“注冊(cè) ”按鈕,即可進(jìn)入考生注冊(cè)頁面,在該頁面中輸入個(gè)人資料及密碼等一系列信息,如圖 53 所示。單擊“保存”按鈕,系 統(tǒng)將根 據(jù)您輸入的身份證號(hào)進(jìn)行驗(yàn)證是否已經(jīng)注冊(cè),如果注冊(cè)成功,將彈出如圖 54所示的窗口;如果注冊(cè)失敗,將彈出如 圖 55所示的提示框。 圖 53 考生注冊(cè) 界面的運(yùn)行效果 17 圖 54 注冊(cè)成功對(duì)話框 圖 55 注冊(cè)失敗對(duì)話框 a) 設(shè)計(jì)添加注冊(cè)信息頁面 添加注冊(cè)信息頁面主要用于收集輸入的考生注冊(cè)信息,及通過自定義的JavaScript 的函數(shù)驗(yàn)證輸入信息是否合法。在設(shè)置用于收集注冊(cè)信息的表單時(shí),采用的是 Struts 框架的 HTML 標(biāo)簽實(shí)現(xiàn)的,關(guān)鍵代碼如下: html:form action=/manage/?action=studentAdd method=post onsubmit=return checkForm(studentForm) 考生姓名: html:text property=name size=20/ 密碼: html:password styleId=password1 property=pwd size=20/ 確認(rèn)密碼: html:password styleId=password2 property=pwd size=20/性別: html:option value=男 男 /html:option html:option value=女 女 /html:option /html:select 提示問題: html:text property=question size=40/ 問題答案: html:text property=answer size=40/ 專業(yè): html:text property=profession size=40/ 身份證號(hào): html:text property=cardNo size=40/ html:submit property=submit styleClass=btn_grey value=保存 / 基于 Web的網(wǎng)絡(luò)在線考試系統(tǒng)的設(shè)計(jì) 與實(shí)現(xiàn) 18 html:reset property=reset styleClass=btn_grey value=取消 / html:button property=button styleClass=btn_grey value= 返回 onclick==39。39。/ /html:form b) 修改考生信息的 Action 實(shí)現(xiàn)類 在添加注冊(cè)信息頁面中輸入合法的注冊(cè)信息后,單擊“保存”按鈕,網(wǎng)頁會(huì)訪問一個(gè) URL,這個(gè) URL 是 /manage/?action=studentAdd。從該 URL地址中可以知道添加注冊(cè)信息頁面涉及到的 action 參數(shù)值為 studentAdd,也就是當(dāng)action=studentAdd 時(shí),會(huì)調(diào)用 保存考生注冊(cè)信息的 customerAdd()。在該方法中,首先需要將接收到的表單信息強(qiáng)制轉(zhuǎn)換成 ActionForm 類型,然后調(diào)用 StudentDAO類中的 insert()方法,將考生信息保存到數(shù)據(jù)表中,并將返回值保存到變量 ret 中,如果返回值為 re,表示該考生信息已經(jīng)注冊(cè),將提示信息“您已經(jīng)注冊(cè),直接登錄即可!”保存到 HttpServletRequest 對(duì)象的 error 參數(shù)中,然后將頁面重定向到錯(cuò)誤提示信息頁面;否則,如果返回值為 miss,表示注冊(cè)失敗,將錯(cuò)誤提示信息“注冊(cè)失敗”保存到 HttpServletRequest 對(duì)象的 error 參數(shù)中,然后將頁面重定向到錯(cuò)誤提示信息頁面;否則表示注冊(cè)成功,將返回的準(zhǔn)考證 號(hào)保存到 HttpServletRequest對(duì)象的 ret 參數(shù)中,然后將頁面重定向到考生注冊(cè)成功頁面。保存考生注冊(cè)信息的方法 studentAdd()的具體代碼如下: private ActionForward studentAdd(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) { StudentForm studentForm = (StudentForm) form。 String ret = (studentForm)。 if ((re)) { (error, 您已經(jīng)注冊(cè),直接登錄即可! )。 return (error)。 } else if((miss)){ (error, 注冊(cè)失??! )。 return (error)。 }else{ (ret,ret)。 return (studentAdd)。 } } c) 編寫保存考生注冊(cè)信息的 StudentDAO 類的方法 保存考生信息使用的 StudentDAO 類的方法是 insert()。在 insert()方法中,首先從數(shù)據(jù)表 tb_student 中查詢輸入的身份證號(hào)是否存在,如果存在,將標(biāo)志變量設(shè)置為 2;否則,先生成準(zhǔn) 考證號(hào),再將輸入的信息保存到考生信息表中,并將生成的準(zhǔn)考證號(hào)賦給標(biāo)志變量,最后返回該標(biāo)識(shí)變量。 19 找回密碼的實(shí)現(xiàn)過程 運(yùn)行網(wǎng)絡(luò)在線考試系統(tǒng)時(shí),首先進(jìn)入的是考生登錄頁面,在該頁面中單擊“找回密碼”按鈕,即可進(jìn)入到找回密碼第一步頁面, 如圖 56 所示, 用于輸入準(zhǔn)考證號(hào),在該頁面中輸入準(zhǔn)考證號(hào)。單擊“下一步”按鈕,即可進(jìn)入到找回密碼第二步頁面, 如圖 57 所示, 用于輸入密碼提示問題答案,在該頁面的“密碼提示問題”文本框中將 顯示提示問題,在“密碼提示答案”文本框中輸入密碼提示問題的答案 。單擊“下一步”按鈕,進(jìn) 入到找回密碼第三步頁面, 如圖 58 所示, 用于顯示找回的密碼。 圖 56 找回密碼第一步 圖 57 找回密碼第二步 基于 Web的網(wǎng)絡(luò)在線考試系統(tǒng)的設(shè)計(jì) 與實(shí)現(xiàn) 20 圖 58 找回密碼第三步 a) 實(shí)現(xiàn)找回密碼第一步 輸入準(zhǔn)考證號(hào) 在找回密碼第一步頁面中,只需要放置一個(gè)用于獲取準(zhǔn)考證號(hào)的表單及對(duì)應(yīng)的表單元素即可,關(guān)鍵代碼如下: html:form action=/manage/?action=seekPwd1 method=post onsubmit=return checkForm(studentForm) 準(zhǔn)考證號(hào): html:text property=ID size=40/ html:submit property=submit styleClass=btn_grey value=下一步 / html:reset property=reset styleClass=btn_grey value=取消 / html:button property=button styleClass=btn_grey value= 返回 onclick==39。39。/ /html:form 找回密碼第一步對(duì)應(yīng)的方法 seekPwd1()的具體代碼如下: private ActionForward seekPwd1(ActionMapping mapping, ActionForm form,HttpServletRequest request,HttpServletResponse response){ StudentForm studentForm = (StudentForm) form。 StudentForm s=(studentForm)。 (seekPwd2, s)。 if(().equals()){ (error, 您輸入的準(zhǔn)考證號(hào)不存在! )。 return (error)。 }else{ return (seekPwd1)。 } } 21 b) 實(shí)現(xiàn)找回密碼第二步 輸入密碼提示問題答案 在找回密碼第二步頁面中,首先添加一個(gè)表單,并將第一步中返回的提示問題答案顯示在相應(yīng)的文本框中,然后在該表單中添加一個(gè)用于記錄考生檔案 ID的隱藏域,最后在該表單中添加用于輸入密碼提示問題答案的文本框及相應(yīng)的按鈕,關(guān)鍵代碼如下: html:form action=/manage/?action=seekPwd2 method=post onsubmit=return checkForm(studentForm) 密碼提示問題: html:text property=question size=40 name=seekPwd2 readonly=true/ 密碼提示答案: html:text property=answer size=40/ html:submit styleClass=btn_grey value=下一步 / html:reset styleClass=btn_grey value=取消 / /html:form c) 實(shí)現(xiàn)找回密碼第三步 成功找回密碼 準(zhǔn)考證號(hào): html:text property=ID size=40 name=seekPwd3 readonly=true/ 密碼 html:text property=pwd size=40 name=seekPwd3 readonly=true/ 在線考試模塊設(shè)計(jì) 在線考試模塊的概述 在線考試模塊的主要功能是允許考生在網(wǎng)站上針對(duì)指定的課程進(jìn)行考試。在該模塊中,考生首先需要閱讀考試規(guī)則,在同意所列出的考試規(guī)則后,才能選擇考試,在 選擇考試課程后,系統(tǒng)將隨機(jī)抽取試題,然后進(jìn)入考試頁面進(jìn)行答題,當(dāng)考生提
點(diǎn)擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1