版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
由管理员设置,通过各学院教学干事转发给各教师用户。再输入教学编号和密码之后,系统将验证教学编号和密码是否正确。如果验证成功,就使教师处于登录状态。否则,系统显示教学编号或密码错误的信息。(2)教师登录到系统以后,可以使用开设课程的功能。在开设课程的时候,要求输入课程编号、课程名信息。提交信息以后,系统会到数据库中验证该课程是否已经开设过。若没有,则同意开设该课程。3.管理员模块(1)管理员首先要登录到系统,登录的时候要求输入管理员账号和密码。之后系统将验证管理员账号和密码是否正确。如果验证通过,就使管理员处于登录状态。否则,系统将显示管理员账号或密码错误的信息。(2)管理员登录到系统后,可以进行学生管理。包括使用添加学生帐号的功能。在添加的过程中,要求输入学生学号、密码、姓名、院系和专业信息。提交以后,系统会到数据库去验证该学生账号是否已经建立。如果还没有建立,则建立该学生帐号。也可以使用删除学生帐号的功能。系统在删除学生帐号之前,会先删除该账号所选的所有课程,然后再删除该帐号。(3)管理员可以进行教师管理。使用添加教师帐号的功能。在添加的过程中,要求输入教师编号、密码、姓名和院系信息。提交信息以后,系统回到数据库中去验证该教师账号是否已经存在。如果不存在,则建立该教师帐号。也可以删除该教师账号。(4)管理员进行课程管理。根据教学安排决定该课程允许报名的的名额,当超出人数时,该课程将不再出现在学生可选课程中。(5)统计查询:可查询选某课程的学生名单,有打印功能。4.2数据库设计本系统采用mysql数据库,这个数据库目前属于相当主流的数据库,本系统设计了下面数据库表,分别如下设计:表4.2.1admin表序号字段名称字段类型大小允许为空是否主键备注1idInt否是编号2usernameVarChar50是否用户名3userpwdVarChar50是否密码(1)管理员信息表主要是记录了管理员基本信息。表结构如表4.2.1所示。表4.2.2change表序号字段名称字段类型大小允许为空是否主键备注1stuidInt否否学生id2courseidInt否否课程id(2)选课信息表主要是记录了学生的选课信息和课程信息。表结构如表4.2.2所示。表4.2.3course表序号字段名称字段类型大小允许为空是否主键备注1idInt自增编号是编号2coursenoVarChar50是否课程编号3coursenameVarChar50是否课程名称4numInt是否人数(3)课程信息表主要是记录了课程信息。表结构如表4.2.3所示。表4.2.4student表序号字段名称字段类型大小允许为空是否主键备注1idInt自增编号是编号2studynoVarChar50是否学号3stunameVarChar50是否姓名4departmentVarChar50是否院系5majoyVarChar50是否课程6pwdVarChar50是否密码(4)学生信息表主要是记录了学生基本信息。表4.2.5teacher表序号字段名称字段类型大小允许为空是否主键备注1idInt自增编号是编号2teachernoVarChar50是否教师编号3nameVarChar50是否姓名4departmentVarChar50是否院系5pwdVarChar50是否密码(5)老师信息表主要是记录了教师基本信息。4.3功能结构设计网上选课系统的功能结构图如下4-1所示:图4-1功能结构图5软件详细设计5软件详细设计5.1程序设计详细说明5.1.1总体设计为了让此系统具备一个网站的基本操作流程,系统必须基本一个网站的基本功能。总体来说,系统需要具有供用户显示的JSP页面和后台处理的,还要通过sql数据库存储一些信息。5.1.2登录界面模块描述管理员或在员工输入正确的账号密码,选择相应的权限,便可登录到相应的界面,该界面显示如图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("请输入用户名"); document.ThisForm.userName.focus(); returnfalse; } if(document.ThisForm.userPw.value==""){ alert("请输入用户密码"); 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;"> 网上选课管理系统 </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="学生"> 学生 </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>登录模块是系统的首页面是对用户登录模块进行管理的功能模块,用户输入帐号和密码选择用户角色登录成功后根据角色的不同分别进入不同的管理模块。用户登录的流程图如图5-2。图5-2用户登录流程图5.1.3管理员模块描述管理员输入正确的账号密码后可以进入管理员界面,该界面包括对学生管理、教师管理、课程管理和查询统计等进行操作,在该功能上,管理员可以添加学生的编号、学生的姓名、所示院系、专业和密码。如图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>学生管理</b> </dt> <ddstyle='display:block'class='sitem'id='items1_1'> <ulclass='sitemu'> <li> <ahref='<%=path%>/stuServlet'target='main'>学生信息管理</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'>查询统计</a> </li> </ul> </dd> </dl> </td> </tr> </table> </body></html>5.1.4学生信息管理描述在该功能上,学生可以查看课程和选课如图5—5图5-5学生管理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结论6结论互联网技术的发展速度之快是人们始料未及的,尤其是Web技术的发展更是日新月异。现在,Web已经从一种仅仅提供静态HTML网页内容的站点技术发展成为一种在全球范围内进行创造、提供信息、进行协作和学校活动的系统工具。经过几个月的努力,终于完成了网上选课系统功能的设计实现,它是利用JSP技术开发的学校选课系统。前台应用JSP技术实现选课界面,用tomcat作为web的服务器,后台使用MYSQL数据库存放实体,实现了整个选课系统。通过其特点和应用前景的描述,概括了学校选课系统的基本概念,描述了学生,教师和管理员的基本操作流程。简单的实现了学生选课,老师开设课程,管理员可以添加和删除学生以及教师的基本信息,并设置选课人数等操作。在实现这些功能的过程中,发现自己的知识面很窄,也有很大的欠缺,应加强这方面的学习。第一次接触java这种语言更是很陌生。由于以前很少应用这方面的知识,所以理解起来感觉很困难。只是实现了选课系统的简单功能。还应该加强这方面的学习,对于选课系统还做进一步的完善和修改。在这次毕业设计中收获很多,也用到了很多之前不怎么用的软件,加深了对它们的了解,同时也了解到自己知识上的严重不足。致谢致谢在整个毕业设计的过程,从刚开始的开题,软件需求分析,软件总体设计,软件详细设计,到最后的系统的编程开发,指导老师提出了很多宝贵的意见和建议,并给予了许多帮助,让我更好的完成了毕业设计。在毕业设计的过程中,先是对JSP和Java做了大量的学习工作,加深了一些了解,进一步的学习了MYSQL,并熟悉了Myeclipse开发环境和JAVA编程语言,为毕业设计的顺利完成奠定了基础。整个毕设在遇到问题时都和同学交流、讨论,或是向指导老师寻求帮助。毕业设计的整个过程让我收获很大。学到了很多以前不知道的知识,在完成毕业设计的整个过程中我遇到很多困难,在同学以及老师的帮助下最后把问题都一一解决了,并最终实现了选课系统。特别是在开发过程中我了解了MyEclipse6.5框架结构,认识到了JAVA与MYSQL的开发技术,我非常感谢在我毕业设计过程中给我提供帮助的同学和老师!只要有问题老师都会耐心讲解,包括最后的论文部分,老师也批注的很细心很认真,不管是上班时间还是下班时间,只要有问题老师都会细心指出来。在此衷心的感谢我的导师。基于JSP的网上选课系统的顺利实现,谢谢我的导师和同学!参考文献参考文献[1]王家华.《软件工程》东北出版社.2001[2]林邦杰.《Java程序设计入门教程》.中国青年出版社.2001[3]《JSP高级编程》(电子网上选课系统)[4]《JavaScript高级编程》(电子网上选课系统)[5]刘晓华等译.《MasteringEnterpriseJavaBeans—SecondEdition》(美)EdRoman著.第二版.电子工业出版社,2002.10[6]赵佩.《Java编程思想》第2版.机械工业出版社.2001[7]于华.《Web设计与发布实用培训教程》北京希望出版社.2000[8]施玉新.《网络编程语言JSP实例教程》电子工业出版社,2002[9]肖刚.《Servlet与JSP权威指南》机械工业出版社,2003[10]李明武.《Web应用编程丛书(6)JavaScript&HTML精通网页编程》希望电子出版社,2001年3月第1版[11]耿祥义、张跃平编,《JSP实用教程》(第2版),清华大学出版社,2007[12]陈志泊,王春雷,《数据库原理及应用教程》(第二版),人民邮电出版社,2008[13]杨珏,卢银娟,赵昊彤,《JSP网络开发技术》人民邮电出版社,2001[14]王国辉,《JavaWeb开发实战宝典》清华大学出版社,2012[15]李曙光,《JSP开发实例完全剖析》中国电力出版社,2006[16]LiuBuxing,SolutionofChineseMessCodeinJSPDesign[J],Electricpowerprofessionaltechnologyjournal,2009,(3)[17]孙鑫著,Servlet/JSP深入详解——基于Tomcat的Web开发,电子工业出版社,2008[18](美)C.J.Date.数据库系统导论.孟小峰,王珊等译.北京:机械工业出版社,2000[19]唐友国、湛洪波,JSP网站开发详解,电子工业出版社,2008[20]WUDe-yan,ResearchofMessCodeofApplicationsRunningonTomcatServer[J],ComputerKnowledgeAndTechnology,2008,3(4):393-395毕业设计(论文)知识产权声明毕业设计(论文)知识产权声明本人完全了解西安工业大学有关保护知识产权的规定,即:本科学生在校攻读学士学位期间毕业设计(论文)工作的知识产权属于西安工业大学。本人保证毕业离校后,使用毕业设计(论文)工作成果或用毕业设计(论文)工作成果发表论文时署名单位仍然为西安工业大学。学校有权保留送交的毕业设计(论文)的原文或复印件,允许毕业设计(论文)被查阅和借阅;学校可以公布毕业设计(论文)的全部或部分内容,可以采用影印、缩印或其他复制手段保存毕业设计(论文)。(保密的毕业设计(论文)在解密后应遵守此规定)毕业设计(论文)作者签名:指导教师签名:日期:毕业设计(论文)独创性声明毕业设计(论文)独创性声明秉承学校严谨的学风与优良的科学道德,本人声明所呈交的毕业设计(论文)是我个人在导师指导下进行的研究工作及取得的研究成果。尽我所知,除了文中特别加以标注和致谢的地方外,毕业设计(论文)中不包含其他人已经发表或撰写过的成果,不包含他人已申请学位或其他用途使用过的成果。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示了致谢。毕业设计(论文)与资料若有不实之处,本人承担一切相关责任。毕业设计(论文)作者签名:指导教师签名:日期:附录本科毕业设计(论文)外文翻译院(系):计算机科学与工程专业:计算机科学与技术班级:110604学生:徐朝平学号:110604133指导教师:杨国梁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.西安工业大学毕业设计(论文)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等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 公共营养师考试营养流行病学与营养调查习题集及答案
- 北师大版数学 专题2.5 有理数的混合运算(知识梳理+7个考点讲练+中考真题演练+难度分层练 共46题) 同步练习 含答案
- 2026AIoT智慧社区综合解决方案
- 10.1民族复兴梦 课件 2026-2027学年统编版道德与法治 九年级上册
- 2026年初中物理奥数题目及答案
- 2.2《站稳人民立场》课件 2026-2027学年道德与法治九年级上册 统编版
- 云南成考高升专理化综合真题带答案试卷
- 河南成考专升本医学综合真题试卷
- 2026年幸运儿七道题目及答案
- 中国电子科技集团公司第十研究所2027届秋季校园招聘笔试参考题库及答案解析
- 四川省公路工程建设项目监督要点(2026年版)
- 2026中国二手车出口认证标准与海外渠道建设研究报告
- 第5章一元一次方程章起始课-课件2025-2026学年华东师大版七年级数学下册
- 2026年急诊科专科护理内涵建设与发展课件
- 2026统编版八年级历史上册全册问答版知识梳理
- 雨课堂学堂在线学堂云《导弹总体设计导论(国防科技)》单元测试考核答案
- 2025-2026学年浙江七彩阳光新高考研究联盟高一上学期期中考英语试题含答案
- 《产品结构设计与实践》 课件汇 第0-4章 绪论、空调遥控器结构设计-果盘一体化结构设计
- 2025年中国真空杯行业市场前景预测及投资价值评估分析报告
- 水利普法宣传课件
- 江苏省徐州市2024-2025学年七年级上学期期中考试数学试卷(含答案)
评论
0/150
提交评论