本科畢業(yè)論文-基于jsp的網(wǎng)上選課系統(tǒng)_第1頁
本科畢業(yè)論文-基于jsp的網(wǎng)上選課系統(tǒng)_第2頁
本科畢業(yè)論文-基于jsp的網(wǎng)上選課系統(tǒng)_第3頁
本科畢業(yè)論文-基于jsp的網(wǎng)上選課系統(tǒng)_第4頁
本科畢業(yè)論文-基于jsp的網(wǎng)上選課系統(tǒng)_第5頁
已閱讀5頁,還剩49頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

由管理員設(shè)置,通過各學(xué)院教學(xué)干事轉(zhuǎn)發(fā)給各教師用戶。再輸入教學(xué)編號(hào)和密碼之后,系統(tǒng)將驗(yàn)證教學(xué)編號(hào)和密碼是否正確。如果驗(yàn)證成功,就使教師處于登錄狀態(tài)。否則,系統(tǒng)顯示教學(xué)編號(hào)或密碼錯(cuò)誤的信息。(2)教師登錄到系統(tǒng)以后,可以使用開設(shè)課程的功能。在開設(shè)課程的時(shí)候,要求輸入課程編號(hào)、課程名信息。提交信息以后,系統(tǒng)會(huì)到數(shù)據(jù)庫中驗(yàn)證該課程是否已經(jīng)開設(shè)過。若沒有,則同意開設(shè)該課程。3.管理員模塊(1)管理員首先要登錄到系統(tǒng),登錄的時(shí)候要求輸入管理員賬號(hào)和密碼。之后系統(tǒng)將驗(yàn)證管理員賬號(hào)和密碼是否正確。如果驗(yàn)證通過,就使管理員處于登錄狀態(tài)。否則,系統(tǒng)將顯示管理員賬號(hào)或密碼錯(cuò)誤的信息。(2)管理員登錄到系統(tǒng)后,可以進(jìn)行學(xué)生管理。包括使用添加學(xué)生帳號(hào)的功能。在添加的過程中,要求輸入學(xué)生學(xué)號(hào)、密碼、姓名、院系和專業(yè)信息。提交以后,系統(tǒng)會(huì)到數(shù)據(jù)庫去驗(yàn)證該學(xué)生賬號(hào)是否已經(jīng)建立。如果還沒有建立,則建立該學(xué)生帳號(hào)。也可以使用刪除學(xué)生帳號(hào)的功能。系統(tǒng)在刪除學(xué)生帳號(hào)之前,會(huì)先刪除該賬號(hào)所選的所有課程,然后再刪除該帳號(hào)。(3)管理員可以進(jìn)行教師管理。使用添加教師帳號(hào)的功能。在添加的過程中,要求輸入教師編號(hào)、密碼、姓名和院系信息。提交信息以后,系統(tǒng)回到數(shù)據(jù)庫中去驗(yàn)證該教師賬號(hào)是否已經(jīng)存在。如果不存在,則建立該教師帳號(hào)。也可以刪除該教師賬號(hào)。(4)管理員進(jìn)行課程管理。根據(jù)教學(xué)安排決定該課程允許報(bào)名的的名額,當(dāng)超出人數(shù)時(shí),該課程將不再出現(xiàn)在學(xué)生可選課程中。(5)統(tǒng)計(jì)查詢:可查詢選某課程的學(xué)生名單,有打印功能。4.2數(shù)據(jù)庫設(shè)計(jì)本系統(tǒng)采用mysql數(shù)據(jù)庫,這個(gè)數(shù)據(jù)庫目前屬于相當(dāng)主流的數(shù)據(jù)庫,本系統(tǒng)設(shè)計(jì)了下面數(shù)據(jù)庫表,分別如下設(shè)計(jì):表4.2.1admin表序號(hào)字段名稱字段類型大小允許為空是否主鍵備注1idInt否是編號(hào)2usernameVarChar50是否用戶名3userpwdVarChar50是否密碼(1)管理員信息表主要是記錄了管理員基本信息。表結(jié)構(gòu)如表4.2.1所示。表4.2.2change表序號(hào)字段名稱字段類型大小允許為空是否主鍵備注1stuidInt否否學(xué)生id2courseidInt否否課程id(2)選課信息表主要是記錄了學(xué)生的選課信息和課程信息。表結(jié)構(gòu)如表4.2.2所示。表4.2.3course表序號(hào)字段名稱字段類型大小允許為空是否主鍵備注1idInt自增編號(hào)是編號(hào)2coursenoVarChar50是否課程編號(hào)3coursenameVarChar50是否課程名稱4numInt是否人數(shù)(3)課程信息表主要是記錄了課程信息。表結(jié)構(gòu)如表4.2.3所示。表4.2.4student表序號(hào)字段名稱字段類型大小允許為空是否主鍵備注1idInt自增編號(hào)是編號(hào)2studynoVarChar50是否學(xué)號(hào)3stunameVarChar50是否姓名4departmentVarChar50是否院系5majoyVarChar50是否課程6pwdVarChar50是否密碼(4)學(xué)生信息表主要是記錄了學(xué)生基本信息。表4.2.5teacher表序號(hào)字段名稱字段類型大小允許為空是否主鍵備注1idInt自增編號(hào)是編號(hào)2teachernoVarChar50是否教師編號(hào)3nameVarChar50是否姓名4departmentVarChar50是否院系5pwdVarChar50是否密碼(5)老師信息表主要是記錄了教師基本信息。4.3功能結(jié)構(gòu)設(shè)計(jì)網(wǎng)上選課系統(tǒng)的功能結(jié)構(gòu)圖如下4-1所示:圖4-1功能結(jié)構(gòu)圖5軟件詳細(xì)設(shè)計(jì)5軟件詳細(xì)設(shè)計(jì)5.1程序設(shè)計(jì)詳細(xì)說明5.1.1總體設(shè)計(jì)為了讓此系統(tǒng)具備一個(gè)網(wǎng)站的基本操作流程,系統(tǒng)必須基本一個(gè)網(wǎng)站的基本功能??傮w來說,系統(tǒng)需要具有供用戶顯示的JSP頁面和后臺(tái)處理的,還要通過sql數(shù)據(jù)庫存儲(chǔ)一些信息。5.1.2登錄界面模塊描述管理員或在員工輸入正確的賬號(hào)密碼,選擇相應(yīng)的權(quán)限,便可登錄到相應(yīng)的界面,該界面顯示如圖5-1:圖5-1登錄界面<%@pagelanguage="java"import="java.util.*"pageEncoding="utf-8"%><head> <title>login.jsp</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <linkrel="stylesheet"type="text/css"href="<%=path%>/css/style.css"> <styletype="text/css">body{ margin-left:0px; background-image:url(<%=path%>/images/bhj.jpg);}.style2{ color:#990000}.input2{ font-size:12px; border:3pxdouble#A8D0EE; color:#344898;}.submit1{ border:3pxdouble#416C9C; height:22px; width:45px; background-color:#F2F2F2; font-size:12px; padding-top:1px; background-image:url(bt.gif); cursor:hand;}.STYLE12{ font-family:Georgia,"TimesNewRoman",Times,serif}.STYLE13{ color:#316BD6;}.STYLE15{ color:#fdsere; font-size:9pt;}</style> <script> functioncheck1(){ if(document.ThisForm.userName.value==""){ alert("請(qǐng)輸入用戶名"); document.ThisForm.userName.focus(); returnfalse; } if(document.ThisForm.userPw.value==""){ alert("請(qǐng)輸入用戶密碼"); document.ThisForm.userName.focus(); returnfalse; } document.ThisForm.action="<%=path%>/accountServlet"; document.ThisForm.submit(); }</script></head><body><body> <br> <br> <br> <br> <tablewidth="559"height="423"border="0"align="center" cellpadding="0"cellspacing="0"background="<%=path%>/images/dfff.jpg"> <tr> <td> <divalign="center"style="FONT-WEIGHT:bold;FONT-SIZE:40pt;"> 網(wǎng)上選課管理系統(tǒng) </div> </td> </tr> <tr> <tdwidth="559"> <formname="ThisForm"method="post"action=""> <tablewidth="410"height="198"border="0"align="right" cellpadding="0"cellspacing="0"> <tr> <tdheight="10"colspan="2"></td> </tr> <tr> <tdwidth="54"height="22"valign="bottom"> <spanclass="STYLE15">用戶名:</span> </td> <tdwidth="356"valign="bottom"> <inputname="userName"type="text"class="input2"o this.style.background='#F0DAF3' ;; this.style.background='#FFFFFF'"> </td> </tr> <tr> <tdheight="10"colspan="2"valign="bottom"></td> </tr> <tr> <tdheight="31"colspan="2"valign="top"class="STYLE15"> 密  碼: <inputname="userPw"type="password"size="21"class="input2" align="bottom"othis.style.background='#F0DAF3' ;; this.style.background='#FFFFFF'"> </td> </tr> <tr> <tdheight="10"colspan="2"valign="bottom"></td> </tr> <tr> <tdheight="31"colspan="2"valign="top"class="STYLE15"> 角  色: <selectname="role"style="width:130px"> <optionvalue="管理員"> 管理員 </option> <optionvalue="教師"> 教師 </option> <optionvalue="學(xué)生"> 學(xué)生 </option> </select> </td> </tr> <tr> <tdheight="10"colspan="2"valign="bottom"></td> </tr> <tr> <tdcolspan="3"valign="top">        <inputname="button"type="button"class="submit1"value="登錄" onclick="check1()">   <inputname="Submit2"type="reset"class="submit1"value="重置"> <imgid="indicator"src="<%=path%>/images/loading.gif" style="display:none"/> </td> </tr> </table> </form> </td> </tr></html>登錄模塊是系統(tǒng)的首頁面是對(duì)用戶登錄模塊進(jìn)行管理的功能模塊,用戶輸入帳號(hào)和密碼選擇用戶角色登錄成功后根據(jù)角色的不同分別進(jìn)入不同的管理模塊。用戶登錄的流程圖如圖5-2。圖5-2用戶登錄流程圖5.1.3管理員模塊描述管理員輸入正確的賬號(hào)密碼后可以進(jìn)入管理員界面,該界面包括對(duì)學(xué)生管理、教師管理、課程管理和查詢統(tǒng)計(jì)等進(jìn)行操作,在該功能上,管理員可以添加學(xué)生的編號(hào)、學(xué)生的姓名、所示院系、專業(yè)和密碼。如圖5-4所示。圖5-4管理員界面<%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%><%Stringpath=request.getContextPath();%><!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"><html> <head> <title>MyJSP'menu.jsp'startingpage</title> <metahttp-equiv="pragma"content="no-cache"> <metahttp-equiv="cache-control"content="no-cache"> <metahttp-equiv="expires"content="0"> <metahttp-equiv="keywords"content="keyword1,keyword2,keyword3"> <metahttp-equiv="description"content="Thisismypage"> <linkrel="stylesheet"href="<%=path%>/css/base.css"type="text/css"/> <linkrel="stylesheet"href="<%=path%>/css/menu.css"type="text/css"/> <styletype="text/css"> div{ padding:0px; margin:0px; } body{ scrollbar-base-color:#bae87c; scrollbar-arrow-color:#FFFFFF; scrollbar-shadow-color:#c1ea8b; padding:0px; margin:auto; text-align:center; background-color:#9ad075; } dl.bitem{ width:148px; margin:0px0px5px4px; } dl.bitemdt{ background:url(<%=path%>/images/menubg.gif); height:26px; line-height:26px; text-align:center; cursor:pointer; } dl.bitemdd{ padding:3px3px3px3px; background-color:#fff; } .fllct { float:left; width:90px; } .flrct { padding-top:3px; float:left; } div.items { line-height:22px; background:url(<%=path%>/images/arr4.gif)no-repeat10px9px; } span.items { padding:10px0px10px22px; background:url(<%=path%>/images/arr4.gif)no-repeat10px12px; } ul{ padding-top:3px; } li{ height:22px; } .sitemuli{ padding:0px0px0px22px; line-height:24px; background:url(<%=path%>/images/arr4.gif)no-repeat10px9px; } </style> <scriptlanguage='javascript'>varcuropenItem='1';</script> <scriptlanguage="javascript"type="text/javascript" src="<%=path%>/js/menu.js"></script> <basetarget="main"/> </head> <bodytarget="main"> <tablewidth='99%'height="100%"border='0'cellspacing='0' cellpadding='0'> <tr> <tdstyle='padding-left:3px;padding-top:8px'valign="top"> <!--1--> <dlclass='bitem'> <dtonClick='showHide("items1_1")'> <b>學(xué)生管理</b> </dt> <ddstyle='display:block'class='sitem'id='items1_1'> <ulclass='sitemu'> <li> <ahref='<%=path%>/stuServlet'target='main'>學(xué)生信息管理</a> </li> </dd> </dl> <!--1--> <dlclass='bitem'> <dtonClick='showHide("items1_1")'> <b>教師管理</b> </dt> <ddstyle='display:block'class='sitem'id='items1_1'> <ulclass='sitemu'> <li> <ahref='<%=path%>/teacherServlet'target='main'>教師信息管理</a> </li> </ul> </dd> </dl> <dlclass='bitem'> <dtonClick='showHide("items1_1")'> <b>課程管理</b> </dt> <ddstyle='display:block'class='sitem'id='items1_1'> <ulclass='sitemu'> <li> <ahref='<%=path%>/courseServlet'target='main'>課程信息管理</a> </li> </ul> </dd> </dl> <dlclass='bitem'> <dtonClick='showHide("items1_1")'> <b>操作</b> </dt> <ddstyle='display:block'class='sitem'id='items1_1'> <ulclass='sitemu'> <li> <ahref='<%=path%>/changeServlet'target='main'>查詢統(tǒng)計(jì)</a> </li> </ul> </dd> </dl> </td> </tr> </table> </body></html>5.1.4學(xué)生信息管理描述在該功能上,學(xué)生可以查看課程和選課如圖5—5圖5-5學(xué)生管理packagecom.coursesys.servlet;importjava.io.IOException;importjava.io.PrintWriter;importjavax.servlet.ServletException;importjavax.servlet.http.HttpServlet;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;importcom.coursesys.dao.ChangeDAO;importjava.util.*;publicclassChangeServletextendsHttpServlet{ publicvoidservice(HttpServletRequestrequest,HttpServletResponseresponse) throwsServletException,IOException{ Stringoperate=request.getParameter("operate"); ChangeDAOdao=newChangeDAO(); if("owner".equals(operate)){ intstuID=(Integer)request.getSession().getAttribute("stuID"); Listlist=dao.show("select*fromchangewherestuid="+stuID, null); request.setAttribute("all",list); request.getRequestDispatcher("/change.jsp").forward(request, response); }elseif("query".equals(operate)){ StringcourseName=request.getParameter("courseName"); intid=dao.findCourseByName(courseName); Listlist=dao.show("select*fromchangewherecourseid="+id, null); request.setAttribute("all",list); request.getRequestDispatcher("/stu_change.jsp").forward(request, response); } else{ Listlist=dao.show("select*fromchange",null); request.setAttribute("all",list); request.getRequestDispatcher("/change_all.jsp").forward(request, response); } }}5.1.5老師信息管理描述老師可以查看課程和添加課程,如圖5—6圖5-6教師管理packagecom.coursesys.servlet;importjava.io.IOException;importjava.io.PrintWriter;importjava.util.List;importjavax.servlet.ServletException;importjavax.servlet.http.HttpServlet;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;importcom.coursesys.dao.CourseDAO;importcom.coursesys.dao.TeacherDAO;publicclassTeacherServletextendsHttpServlet{ publicvoidservice(HttpServletRequestrequest,HttpServletResponseresponse) throwsServletException,IOException{ response.setContentType("text/html;charset=gbk"); PrintWriterpw=response.getWriter(); TeacherDAOdao=newTeacherDAO(); Stringoperate=request.getParameter("operate"); if("add".equals(operate)){ StringteacherNO=request.getParameter("teacherNO"); StringteacherName=request.getParameter("teacherName"); Stringdepartment=request.getParameter("department"); Stringpwd=request.getParameter("pwd"); booleanflag=dao.isExists( "select*fromteacherwhereteacherno=?",teacherNO); if(flag){ pw.println("<script>alert('教師已存在!');history.go(-1);</script>"); pw.flush(); pw.close(); }else{ dao.operate( "insertintoteachervalues(?,?,?,?)", newObject[]{teacherNO,teacherName,department,pwd}); } }if("del".equals(operate)){ intid=Integer.parseInt(request.getParameter("id")); dao.operate("deletefromteacherwhereid="+id,null);} Listlist=dao.show("select*fromteacher",null); request.setAttribute("all",list); request.getRequestDispatcher("/teacher_show.jsp").forward(request, response); }}6結(jié)論6結(jié)論互聯(lián)網(wǎng)技術(shù)的發(fā)展速度之快是人們始料未及的,尤其是Web技術(shù)的發(fā)展更是日新月異。現(xiàn)在,Web已經(jīng)從一種僅僅提供靜態(tài)HTML網(wǎng)頁內(nèi)容的站點(diǎn)技術(shù)發(fā)展成為一種在全球范圍內(nèi)進(jìn)行創(chuàng)造、提供信息、進(jìn)行協(xié)作和學(xué)?;顒?dòng)的系統(tǒng)工具。經(jīng)過幾個(gè)月的努力,終于完成了網(wǎng)上選課系統(tǒng)功能的設(shè)計(jì)實(shí)現(xiàn),它是利用JSP技術(shù)開發(fā)的學(xué)校選課系統(tǒng)。前臺(tái)應(yīng)用JSP技術(shù)實(shí)現(xiàn)選課界面,用tomcat作為web的服務(wù)器,后臺(tái)使用MYSQL數(shù)據(jù)庫存放實(shí)體,實(shí)現(xiàn)了整個(gè)選課系統(tǒng)。通過其特點(diǎn)和應(yīng)用前景的描述,概括了學(xué)校選課系統(tǒng)的基本概念,描述了學(xué)生,教師和管理員的基本操作流程。簡單的實(shí)現(xiàn)了學(xué)生選課,老師開設(shè)課程,管理員可以添加和刪除學(xué)生以及教師的基本信息,并設(shè)置選課人數(shù)等操作。在實(shí)現(xiàn)這些功能的過程中,發(fā)現(xiàn)自己的知識(shí)面很窄,也有很大的欠缺,應(yīng)加強(qiáng)這方面的學(xué)習(xí)。第一次接觸java這種語言更是很陌生。由于以前很少應(yīng)用這方面的知識(shí),所以理解起來感覺很困難。只是實(shí)現(xiàn)了選課系統(tǒng)的簡單功能。還應(yīng)該加強(qiáng)這方面的學(xué)習(xí),對(duì)于選課系統(tǒng)還做進(jìn)一步的完善和修改。在這次畢業(yè)設(shè)計(jì)中收獲很多,也用到了很多之前不怎么用的軟件,加深了對(duì)它們的了解,同時(shí)也了解到自己知識(shí)上的嚴(yán)重不足。致謝致謝在整個(gè)畢業(yè)設(shè)計(jì)的過程,從剛開始的開題,軟件需求分析,軟件總體設(shè)計(jì),軟件詳細(xì)設(shè)計(jì),到最后的系統(tǒng)的編程開發(fā),指導(dǎo)老師提出了很多寶貴的意見和建議,并給予了許多幫助,讓我更好的完成了畢業(yè)設(shè)計(jì)。在畢業(yè)設(shè)計(jì)的過程中,先是對(duì)JSP和Java做了大量的學(xué)習(xí)工作,加深了一些了解,進(jìn)一步的學(xué)習(xí)了MYSQL,并熟悉了Myeclipse開發(fā)環(huán)境和JAVA編程語言,為畢業(yè)設(shè)計(jì)的順利完成奠定了基礎(chǔ)。整個(gè)畢設(shè)在遇到問題時(shí)都和同學(xué)交流、討論,或是向指導(dǎo)老師尋求幫助。畢業(yè)設(shè)計(jì)的整個(gè)過程讓我收獲很大。學(xué)到了很多以前不知道的知識(shí),在完成畢業(yè)設(shè)計(jì)的整個(gè)過程中我遇到很多困難,在同學(xué)以及老師的幫助下最后把問題都一一解決了,并最終實(shí)現(xiàn)了選課系統(tǒng)。特別是在開發(fā)過程中我了解了MyEclipse6.5框架結(jié)構(gòu),認(rèn)識(shí)到了JAVA與MYSQL的開發(fā)技術(shù),我非常感謝在我畢業(yè)設(shè)計(jì)過程中給我提供幫助的同學(xué)和老師!只要有問題老師都會(huì)耐心講解,包括最后的論文部分,老師也批注的很細(xì)心很認(rèn)真,不管是上班時(shí)間還是下班時(shí)間,只要有問題老師都會(huì)細(xì)心指出來。在此衷心的感謝我的導(dǎo)師?;贘SP的網(wǎng)上選課系統(tǒng)的順利實(shí)現(xiàn),謝謝我的導(dǎo)師和同學(xué)!參考文獻(xiàn)參考文獻(xiàn)[1]王家華.《軟件工程》東北出版社.2001[2]林邦杰.《Java程序設(shè)計(jì)入門教程》.中國青年出版社.2001[3]《JSP高級(jí)編程》(電子網(wǎng)上選課系統(tǒng))[4]《JavaScript高級(jí)編程》(電子網(wǎng)上選課系統(tǒng))[5]劉曉華等譯.《MasteringEnterpriseJavaBeans—SecondEdition》(美)EdRoman著.第二版.電子工業(yè)出版社,2002.10[6]趙佩.《Java編程思想》第2版.機(jī)械工業(yè)出版社.2001[7]于華.《Web設(shè)計(jì)與發(fā)布實(shí)用培訓(xùn)教程》北京希望出版社.2000[8]施玉新.《網(wǎng)絡(luò)編程語言JSP實(shí)例教程》電子工業(yè)出版社,2002[9]肖剛.《Servlet與JSP權(quán)威指南》機(jī)械工業(yè)出版社,2003[10]李明武.《Web應(yīng)用編程叢書(6)JavaScript&HTML精通網(wǎng)頁編程》希望電子出版社,2001年3月第1版[11]耿祥義、張躍平編,《JSP實(shí)用教程》(第2版),清華大學(xué)出版社,2007[12]陳志泊,王春雷,《數(shù)據(jù)庫原理及應(yīng)用教程》(第二版),人民郵電出版社,2008[13]楊玨,盧銀娟,趙昊彤,《JSP網(wǎng)絡(luò)開發(fā)技術(shù)》人民郵電出版社,2001[14]王國輝,《JavaWeb開發(fā)實(shí)戰(zhàn)寶典》清華大學(xué)出版社,2012[15]李曙光,《JSP開發(fā)實(shí)例完全剖析》中國電力出版社,2006[16]LiuBuxing,SolutionofChineseMessCodeinJSPDesign[J],Electricpowerprofessionaltechnologyjournal,2009,(3)[17]孫鑫著,Servlet/JSP深入詳解——基于Tomcat的Web開發(fā),電子工業(yè)出版社,2008[18](美)C.J.Date.數(shù)據(jù)庫系統(tǒng)導(dǎo)論.孟小峰,王珊等譯.北京:機(jī)械工業(yè)出版社,2000[19]唐友國、湛洪波,JSP網(wǎng)站開發(fā)詳解,電子工業(yè)出版社,2008[20]WUDe-yan,ResearchofMessCodeofApplicationsRunningonTomcatServer[J],ComputerKnowledgeAndTechnology,2008,3(4):393-395畢業(yè)設(shè)計(jì)(論文)知識(shí)產(chǎn)權(quán)聲明畢業(yè)設(shè)計(jì)(論文)知識(shí)產(chǎn)權(quán)聲明本人完全了解西安工業(yè)大學(xué)有關(guān)保護(hù)知識(shí)產(chǎn)權(quán)的規(guī)定,即:本科學(xué)生在校攻讀學(xué)士學(xué)位期間畢業(yè)設(shè)計(jì)(論文)工作的知識(shí)產(chǎn)權(quán)屬于西安工業(yè)大學(xué)。本人保證畢業(yè)離校后,使用畢業(yè)設(shè)計(jì)(論文)工作成果或用畢業(yè)設(shè)計(jì)(論文)工作成果發(fā)表論文時(shí)署名單位仍然為西安工業(yè)大學(xué)。學(xué)校有權(quán)保留送交的畢業(yè)設(shè)計(jì)(論文)的原文或復(fù)印件,允許畢業(yè)設(shè)計(jì)(論文)被查閱和借閱;學(xué)??梢怨籍厴I(yè)設(shè)計(jì)(論文)的全部或部分內(nèi)容,可以采用影印、縮印或其他復(fù)制手段保存畢業(yè)設(shè)計(jì)(論文)。(保密的畢業(yè)設(shè)計(jì)(論文)在解密后應(yīng)遵守此規(guī)定)畢業(yè)設(shè)計(jì)(論文)作者簽名:指導(dǎo)教師簽名:日期:畢業(yè)設(shè)計(jì)(論文)獨(dú)創(chuàng)性聲明畢業(yè)設(shè)計(jì)(論文)獨(dú)創(chuàng)性聲明秉承學(xué)校嚴(yán)謹(jǐn)?shù)膶W(xué)風(fēng)與優(yōu)良的科學(xué)道德,本人聲明所呈交的畢業(yè)設(shè)計(jì)(論文)是我個(gè)人在導(dǎo)師指導(dǎo)下進(jìn)行的研究工作及取得的研究成果。盡我所知,除了文中特別加以標(biāo)注和致謝的地方外,畢業(yè)設(shè)計(jì)(論文)中不包含其他人已經(jīng)發(fā)表或撰寫過的成果,不包含他人已申請(qǐng)學(xué)位或其他用途使用過的成果。與我一同工作的同志對(duì)本研究所做的任何貢獻(xiàn)均已在論文中作了明確的說明并表示了致謝。畢業(yè)設(shè)計(jì)(論文)與資料若有不實(shí)之處,本人承擔(dān)一切相關(guān)責(zé)任。畢業(yè)設(shè)計(jì)(論文)作者簽名:指導(dǎo)教師簽名:日期:附錄本科畢業(yè)設(shè)計(jì)(論文)外文翻譯院(系):計(jì)算機(jī)科學(xué)與工程專業(yè):計(jì)算機(jī)科學(xué)與技術(shù)班級(jí):110604學(xué)生:徐朝平學(xué)號(hào):110604133指導(dǎo)教師:楊國梁2015年6月外文原文JSPTechnologyTheJavaServerPages(JSP)isakindofaccordingtowebofthescriptplaitdistancetechnique,similarcarriesthescriptlanguageofJavaintheserveroftheNetscapecompanyofserver-sideJavaScript(SSJS)andtheActiveServerPages(ASP)oftheMicrosoft.JSPcomparestheSSJSandASPtohavebettercanexpandsex,anditisnomoreexclusivethananyfactoryorsomeoneparticularserverofWeb.ThoughthenormofJSPistobedrawupbytheSuncompanyof,anyfactorycancarryouttheJSPonownsystem.TheAfterSunreleasetheJSP(theJavaServerPages)formally,thethiskindofnewWebapplicationdevelopmenttechniqueveryquicklycausedthepeople'sconcern.JSPprovidedaspecialdevelopmentenvironmentfortheWebapplicationthatestablishesthehighdynamicstate.AccordingtotheSunparlance,theJSPcanadapttoincludetheApacheWebServer,IIS4.0onthemarketatinsideof85%serverproduct.ThischapterwillintroducetherelatedknowledgeofJSPandDatabases,andJavaBeanrelatedcontents,isallcertainlyrougherintroductionamongthembasiccontents,sayperhapstoisaGuideonly,ifthereaderneedsthemoredetailedinformation,pleasingthebookofconsultthehomologousJSP.1.1GENERALIZETheJSP(JavaServerPages)isfromthecompanyofSunMicrosystemsinitiate,themanycompaniestheparticipatetothebuildupthetogetheroftheakindtheofdynamicthestatewebthepagetechniquestandard,theithavetheitintheconstructiontheofthedynamicstatethewebpagethestrongbutthedonottheespeciallyofthefunction.JSPandthetechniqueofASPoftheMicrosoftisveryalike.BothallprovidetheabilitythatmixeswithacertainprocedurecodeandisexplainbythelanguageenginetocarryouttheprocedurecodeinthecodeofHTML.Underneathwearesimpleofcarryontheintroductiontoit.JSPpagesaretranslatedintoservlets.So,fundamentally,anytaskJSPpagescanperformcouldalsobeaccomplishedbyservlets.However,thisunderlyingequivalencedoesnotmeanthatservletsandJSPpagesareequallyappropriateinallscenarios.Theissueisnotthepowerofthetechnology,itistheconvenience,productivity,andmaintainabilityofoneortheother.Afterall,anythingyoucandoonaparticularcomputerplatformintheJavaprogramminglanguageyoucouldalsodoinassemblylanguage.Butitstillmatterswhichyouchoose.西安工業(yè)大學(xué)畢業(yè)設(shè)計(jì)(論文)JSPprovidesthefollowingbenefitsoverservletsalone:?ItiseasiertowriteandmaintaintheHTML.YourstaticcodeisordinaryHTML:noextrabackslashes,nodoublequotes,andnolurkingJavasyntax.?YoucanusestandardWeb-sitedevelopmenttools.EvenHTMLtoolsthatknownothingaboutJSPcanbeusedbecausetheysimplyignoretheJSPtags.?Youcandivideupyourdevelopmentteam.TheJavaprogrammerscanworkonthedynamiccode.TheWebdeveloperscanconcentrateonthepresentationlayer.Onlargeprojects,thisdivisionisveryimportant.Dependingonthesizeofyourteamandthecomplexityofyourproject,youcanenforceaweakerorstrongerseparationbetweenthestaticHTMLandthedynamiccontent.Now,thisdiscussionisnottosaythatyoushouldstopusingservletsanduseonlyJSPinstead.Bynomeans.Almostallprojectswilluseboth.Forsomerequestsinyourproject,youwilluseservlets.Forothers,youwilluseJSP.Forstillothers,youwillcombinethemwiththeMVCarchitecture.Youwanttheappropriatetoolforthejob,andservlets,bythemselves,donotcompleteyourtoolkit.1.2SOURCEOFJSPThetechniqueofJSPofthecompanyofSun,makingthepageofWebdevelopthepersonnelcanusetheHTMLperhapsmarkingofXMLtodesigntoturntheendpagewithformat.UsetheperhapssmallscriptfuturelifeofmarkingofJSPbecomesthedynamicstateonthepagecontents.(thecontentschangesaccordingtotheclaimof)TheJavaServletisatechnicalfoundationofJSP,andthelargeWebappliesthedevelopmentoftheproceduretoneedtheJavaServlettomatchwithwiththeJSPandthencancomplete,thisnameofServletcomesfromtheApplet,thelocaltranslationmethodofnowisalotof,thisbookinordernottomisconstruction,decidethedirectadoptionServletbutdon'tdoanytranslation,ifreaderwouldliketo,cancallitas"smallserviceprocedure".TheServletissimilartotraditionalCGI,ISAPI,NSAPIetc.Webproceduredevelopmentthefunctionofthetoolinfact,atusetheJavaServlethereafter,thecustomerneednotuseagainthelowlymethodofCGIofefficiency,alsoneednotuseonlytheabilitycometobornpageofWebofdynamicstateinthemethodofAPIthatacertainfixedWebserverterracecirculate.ManyserversofWeballsupporttheServlet,evennotsupporttheServletserverofWebdirectlyandcanalsopasstheadditionalappliedserverandthemoldpiecestosupporttheServlet.ReceivebenefitinthecharacteristicoftheJavacross-platform,theServletisalsoaterraceirrelevant,actually,aslongasmatchthenormofJavaServlet,theServletiscompletetohavenothingtodowithterraceandistohavenothingtodowithserverofWeb.BecausetheJavaServletisinternaltoprovidetheservicebythelinedistance,neednotstartaprogresstotheeachclaimses,andmakeuseofthemulti-threadingmechanismcanatthesametimeforseveralclaimservice,thereforetheefficiencyofJavaServletisveryhigh.ButtheJavaServletalsoisnottohasnoweakness,similartotraditionalCGI,ISAPI,theNSAPImethod,theJavaServletistomakeuseoftooutputtheHTMLlanguagesentencetocarryoutthedynamicstatewebpageof,ifdevelopthewholewebsitewiththeJavaServlet,theintegrationprocessofthedynamicstatepartandthestaticstatepageisanevil-forebodingdreamsimply.ForsolvingthiskindofweaknessoftheJavaServlet,theSUNreleasedtheJSP.Anumberofyearsago,Martywasinvitedtoattendasmall20-personindustryroundtablediscussiononsoftwaretechnology.SittingintheseatnexttoMartywasJamesGosling,inventoroftheJavaprogramminglanguage.Sittingseveralseatsawaywasahigh-levelmanagerfromaverylargesoftwarecompanyinRedmond,Washington.Duringthediscussion,themoderatorbroughtupthesubjectofJini,whichatthattimewasanewJavatechnology.Themoderatoraskedthemanagerwhathethoughtofit,andthemanagerrespondedthatitwastooearlytotell,butthatitseemedtobeanexcellentidea.Hewentontosaythattheywouldkeepaneyeonit,andifitseemedtobecatchingon,theywouldfollowhiscompany'susual"embraceandextend"strategy.Atthispoint,Goslinglightheartedlyinterjected"Youmeandisgraceanddistend."Now,thegrievancethatGoslingwasairingwasthathefeltthatthiscompanywouldtaketechnologyfromothercompaniesandsubornitfortheirownpurposes.Butguesswhat?Theshoeisontheotherfoothere.TheJavacommunitydidnotinventtheideaofdesigningpagesasamixtureofstaticHTMLanddynamiccodemarkedwithspecialtags.Forexample,ColdFusiondidityearsearlier.EvenASP(aproductfromtheverysoftwarecompanyoftheaforementionedmanager)popularizedthisapproachbeforeJSPcamealonganddecidedtojumponthebandwagon.Infact,JSPnotonlyadoptedthegeneralidea,itevenusedmanyofthesamespecialtagsasASPdid.TheJSPisanestablishmentatthemodelofJavaservletsonoftheexpressionlayertechnique,itmakestheplaitwritetheHTMLtobecomemoresimple.BeliketheSSJS,italsoallowsyoucarrythestaticstateHTMLcontentsandserversthescriptmixtoputtogethertheborndynamicstateexportation.JSPthescriptlanguagethattheJavaisthetacitapproval,however,beliketheASPandcanuseotherlanguages(suchasJavaScriptandVBScript),thenormofJSPalsoallowstouseotherlanguages.1.3JSPCHARACTERISTICSIsaserviceaccordingtothescriptlanguageinsomeonelanguageofthestaturessystemthiskindofdiscuss,theJSPshouldbeseemakeisakindofscriptlanguage.However,beakindofscriptlanguage,theJSPseemedtobetoostrongagain,almostcanuseallJavasintheJSP.Beakindofaccordingtotextoriginallyof,takemanifestationasthecentraldevelopmenttechnique,theJSPprovidedalladvantagesoftheJavaServlet,and,whencombinewithaJavaBeanstogether,providingakindofmakecontentsandmanifestationthatsimplewaythatlogicseparate.Separatethecontentsandadvantageoflogicalmanifestationsis,thepersonnelwhorenewsthepageexternalappearanceneednotknowthecodeofJava,andrenewtheJavaBeanspersonnelalsoneednotbedesignthewebpageofexpertinhand,canusetotakethepageofJavaBeansJSPtodefinethetemplateofWeb,tobuildupafromhavethealikeexternalappearanceofthewebsitethatpageconstitute.JavaBeanscompletesthedatatoprovide,havingnocodeofJavainthetemplatethus,thismeansthatthesetemplatescanbewrittenthepersonnelbyaHTMLplaittosupport.Certainly,canalsomakeuseoftheJavaServlettocontrolthelogicofthewebsite,adjustthroughtheJavaServlettousethewayofthedocumentofJSPtoseparatewebsiteoflogicandcontents.Generallyspeaking,inactualengineofJSP,thepageofJSPistheeditandtranslatetypewhilecarryout,notexplainthetypeof.Explainthedynamicstatewebpagedevelopmenttoolofthetype,suchasASP,PHP3etc.,becausespeedetc.reason,havealreadycan'tsatisfycurrentthelargeelectroniccommerceneedsappliedly,traditionaldevelopmenttechniquesareallattoeditandtranslatetheexecutivewaychange,suchastheASP→ASP+;PHP3→PHP4.IntheJSPnormbook,didnotrequesttheprocedureintheJSPcodepart(becalledtheScriptlet)andmustwritewiththeJavadefinitely.Actually,havesomeenginesofJSPareadoptiveotherscriptlanguagessuchastheEMAC-Script,etc.,butactuallythisafewscriptlanguagesalsoaretosetupontheJava,editandtranslatefortheServlettocarryoutof.WriteaccordingtothenormofJSP,havenoScriptletofrelationwithJavaalsoiscanof,however,mainlylieintheabilityandJavaBeans,theEnterpriseJavaBeansesbecauseoftheJSPstrongfunctiontoworktogether,soevenistheScriptletpartnottousetheJava,editandtranslateofperformancecodealsoshouldisrelatedwithJava.1.4JSPMECHANISMTocomprehendtheJSPhowunitethetechnicaladvantagethatabovevariousspeakof,cometocarryoutvariousresulteasily,thecustomermustunderstandthedifferentiationof"themoduledevelopsforthewebpageofthecenter"and"thepagedevelopsforthewebpageofthecenter"first.TheSSJSandASPareallinseveralyearagotorelease,thenetworkofthattimeisstillveryyoung,nooneknowstostillhaveinadditiontomakingallbusiness,datasandtheexpressionlogicentertheoriginalwebpageentirelyheapwhatbettersolvethemethod.Thiskindofmodelthattakepageasthecenterstudiesandgetstheveryfastdevelopmenteasily.However,alongwithchangeoftime,thepeopleknowthatthiskindofmethodisunwellinsetuplarge,theWebthatcanupgradeappliestheprocedure.Theexpressionlogicwriteinthescriptenvironmentwaslockinthepage,onlypassingtosheartosliceandgluetostickthencandriveheavyuse.Expressthelogictousuallymixtogetherwithbusinessandthedatalogics,whenthismakesbetheproceduremembertotrytochangeanexternalappearancethatappliestheprocedurebutdonotwanttobreakwithitslliedbusinesslogic,applytheprocedureofmaintenancebeliketowalkthesimilardifficultyontheeggshell.Infactinthebusinessenterprise,heavyusetheapplicationofthemodulealreadythroughverymature,noonewouldliketorewritethoselogicsfortheirappliedprocedure.HTMLandsketchthedesignerhandedovertotheimplementworkoftheirdesigntheWebplaittheonewhowrite,maketheyhavetodoublework-Usuallyisthehandicraftplaittowrite,becausehavenofittoolandcancarrythescriptandtheHTMLcontentsknottotheservertoputtogether.Chienbutspeech,applythecomplexityoftheprocedurealongwiththeWebtopromotecontinuously,thedevelopmentmethodthattakepageasthecenterlimitssextobecometogetupobviously.Atthesametime,the

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論