外文翻译-JSP 和SQL Server 2000相关介绍_第1页
外文翻译-JSP 和SQL Server 2000相关介绍_第2页
外文翻译-JSP 和SQL Server 2000相关介绍_第3页
外文翻译-JSP 和SQL Server 2000相关介绍_第4页
外文翻译-JSP 和SQL Server 2000相关介绍_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1外文原文TheintroduceofJSPandSQLServer2000JSP(JavaServerPages)isinitiatedbySunMicrosystems,Inc.,withmanycompaniestoparticipateintheestablishmentofadynamicwebpagetechnicalstandards.JSPtechnologysomewhatsimilartoASPtechnology,itisinthetraditionalHTMLwebpagedocument(*.htm,*.html)toinserttheJavaprogrammingparagraph(Scriptlet)andJSPtag(tag),thusJSPdocuments(*.jsp).UsingJSPdevelopmentoftheWebapplicationiscross-platformthatcanrunonLinux,isalsoavailableforotheroperatingsystems.JSPtechnologytousetheJavaprogramminglanguagepreparedbythecategoryofXMLtagsandscriptlets,toproducedynamicpagespackageprocessinglogic.Pagealsovisitbytagsandscriptletsexistintheservicessideoftheresourcesoflogic.JSPpagelogicandwebpagedesignanddisplayseparation,supportreusablecomponent-baseddesign,Web-basedapplicationdevelopmentisrapidandeasy.WebserverinthefaceofvisitsJSPpagerequest,thefirstimplementationoftheproceduresof,andthentogetherwiththeresultsoftheimplementationofJSPdocumentsinHTMLcodewiththereturntothecustomer.InserttheJavaprogrammingoperationofthedatabasecanbere-orientedwebsites,inordertoachievetheestablishmentofdynamicpagesneededtofunction.JSPandJavaServlet,isintheimplementationoftheserver,usuallyreturnedtotheclientisanHTMLtext,aslongastheclientbrowserwillbeabletovisit.JSP1.0specificationofthefinalversionislaunchedinSeptember1999,Decemberhasintroduced1.1specifications.AtpresentrelativelynewisJSP1.2norms,JSP2.0normsofthedrafthasalsobeenintroduced.JSPpagesfromHTMLcodeandJavacodeembeddedinoneofthecomponents.TheserverwasinthepagesofclientrequestsaftertheJavacodeandthenwillgeneratetheHTMLpagestoreturntotheclientbrowser.JavaServletJSPisthetechnicalfoundationandlarge-scaleWebapplicationdevelopmentneedsofJavaServletandJSPsupporttocomplete.JSPwiththeJavatechnologyeasytouse,fullyobject-oriented,anda2platform-independentandsecure,mainlyforallthecharacteristicsoftheInternet.JSPtechnologystrength(1)timetoprepare,runeverywhere.AtthispointJavabetterthanPHP,inadditiontosystems,thecodenottomakeanychanges.(2)themulti-platformsupport.Basicallyonallplatformsofanydevelopmentenvironment,inanyenvironmentfordeploymentinanyenvironmentintheexpansion.ComparedASP/PHPlimitationsareobvious.(3)astrongscalability.FromonlyasmallJardocumentscanrunServlet/JSP,tothemultipleserversclusteringandloadbalancing,tomultipleApplicationfortransactionprocessing,informationprocessing,aservertonumerousservers,JavashowsatremendousVitality.(4)diversificationandpowerfuldevelopmenttoolssupport.ThisissimilartotheASP,Javaalreadyhavemanyverygooddevelopmenttools,andmanycanbefree,andmanyofthemhavebeenabletorunonavarietyofplatformsunder.JSPtechnologyvulnerable(1)andthesameASP,Javaistheadvantageofsomeofitsfatalproblem.Itispreciselybecauseinordertocross-platformfunctionality,inordertoextremestretchingcapacity,greatlyincreasingthecomplexityoftheproduct.(2)Javasspeedisclasstocompletethepermanentmemory,soinsomecasesbytheuseofmemorycomparedtothenumberofusersisindeedaminimumcostperformance.Ontheotherhand,italsoneedsdiskspacetostoreaseriesof.Javadocumentsand.Class,aswellasthecorrespondingversionsofdocuments.JSPsixbuilt-inobjects:request,response,out,session,application,config,pagecontext,page,exception.1.Requestfor:Theobjectofthepackageofinformationsubmittedbyusers,bycallingtheobjectcorrespondingwaytoaccesstheinformationpackage,namelytheuseofthetargetuserscanaccesstheinformation.2.Responseobject:3Thecustomersrequestdynamicresponsetotheclientsentthedata.三.sessionobject1.Whatisthesession:sessionobjectisabuilt-inobjectsJSP,itinthefirstJSPpagesloadedautomaticallycreate,completetheconversationofmanagement.Fromacustomertoopenabrowserandconnecttotheserver,toclosethebrowser,leavingtheendofthisserver,knownasaconversation.Whenacustomervisitsaserver,theservermaybeafewpageslinkbetweenrepeatedly,repeatedlyrefreshapage,theservershouldbethroughsomekindofwaytoknowthisisthesameclient,whichrequiressessionobject.2.sessionobjectID:WhenacustomersfirstvisittoaserverontheJSPpages,JSPenginesproduceasessionobject,andassignedaStringtypeofIDnumber,JSPengineatthesametime,theIDnumbersenttotheclient,storedinCookie,thissessionobjects,andcustomersontheestablishmentofaone-to-onerelationship.Whenacustomertoconnecttotheserveroftheotherpages,customersnolongerallocatedtothenewsessionobject,until,closeyourbrowser,theclient-serverobjecttocancelthesession,andtheconversation,andcustomerrelationshipdisappeared.Whenacustomerre-openthebrowsertoconnecttotheserver,theserverforthecustomertocreateanewsessionobject.四.aplicationtarget1.Whatistheapplication:Servershavelaunchedaftertheapplicationobject,whenacustomertovisitthesitebetweenthevariouspageshere,thisapplicationobjectsarethesame,untiltheserverisdown.Butwiththesessiondifferenceisthatallcustomersoftheapplicationobjectsarethesame,thatis,allcustomerssharethisbuilt-inapplicationobjects.2.applicationobjectscommonlyusedmethods:(1)publicvoidsetAttribute(Stringkey,Objectobj):Objectspecifiedparameterswillbetheobjectobjaddedtotheapplicationobject,andtoaddthesubjectofthedesignationofakeywordindex.(2)publicObjectgetAttribute(Stringkey):accesstoapplicationobjectscontainingkeywordsfor.五.outtargets4outasatargetoutputflow,usedtoclientoutputdata.outtargetsfortheoutputdata.六.Cookie1.WhatisCookie:CookieisstoredinWebserverontheusersharddrivesectionofthetext.CookieallowaWebsiteontheuserscomputertostoreinformationonandthengetbacktoit.Forexample,aWebsitemaybegeneratedforeachvisitorauniqueID,andthentoCookieintheformofdocumentsstoredineachusersmachine.IfyouuseIEbrowsertovisitWeb,youwillseeallstoredonyourharddriveontheCookie.Theyaremostoftenstoredinplaces:c:windowscookies(inWindow2000isintheC:DocumentsandSettingsyourusernameCookies)Cookieiskeywordkey=valuevaluetopreservetheformatoftherecord.2.TargetsthecreationofaCookie,CookieobjectcalledtheconstructorcancreateaCookie.Cookieobjectconstructorhastwostringparameters:CookieCookienameandvalue.Cookiec=newCookie(username,john);3.IftheJSPinthepackagegoodCookieobjecttosendtotheclient,theuseoftheresponseaddCookie()method.Format:response.addCookie(c)4.SavetoreadtheclientsCookie,theuseoftheobjectrequestgetCookies()methodwillbeimplementedinallclientcametoanarrayofCookieobjectsintheformoforder,tomeettheneedtoremovetheCookieobject,itisnecessarytocompareanarraycycleEachtargetkeywords.ApacheStrutsisanopen-sourcewebapplicationframeworkfordevelopingJavaEEwebapplications.ItusesandextendstheJavaServletAPItoencouragedeveloperstoadoptamodel-view-controller(MVC)architecture.ItwasoriginallycreatedbyCraigMcClanahananddonatedtotheApacheFoundationinMay,2000.FormerlylocatedundertheApacheJakartaProjectandknownasJakartaStruts,itbecameatoplevelApacheprojectTheWebWorkframeworkspunofffromApacheStrutsseveralyearsago,aimingtoofferenhancementsandrefinementswhileretainingthesamegeneralarchitectureoftheoriginal5Strutsframework.However,itwasannouncedinDecember2005thatStrutswouldre-mergewithWebWork.Arelationaldatabase,SQLServer1,byMicrosoftSQLServeristhedevelopmentandpopularizationofrelationaldatabasesystem(DBMS),whichwasoriginallybyMicrosoft,andAshtonSybaseTate-threecompaniesandjointdevelopment,launchedin1988,thefirstOS/2version.2.andrelationaldatabasemanagementsystem(RDBMS)function:Maintainingtherelationshipbetweendatabasedata,Ensurethecorrectnessofthedatastorage,Whenasystemfault,alldatarecoverytoensureconsistentdonesomecondition3,RDBMS:SQLServer,Oracle,DB/2,SybaseInformix,4andamplifiedRDBMS(File-based):Foxpro,AccessSecond,SQLServer2000version1andSQLServer2000commonversion:1)EnterpriseEdition2)Standardversion3)PersonalEdition4)DeveloperEdition1.1SQLServerfeaturesWiththeintegrationoftheInternet:SQLServer2000databaseenginecomprehensivesupportXMLLanguage,creatingtake(extensibleMarkupLanguage),thattheusercaneasilybedatabasedatareleasedtotheWebpage.Scalabilityandusability:CanspanfromrunningWindows95,98/thelaptoptorunWindows2000large-scalemultipleprocessorsetc.Variousplatforms.Inaddition,tojointlyServer,etc,thesupportindexviewthatSQLServer2000enterpriseeditioncanupgradetothelargestWebsitedesiredperformancelevel.Enterprisedatabasesfunctions:SQLServer2000distributedquerycanquotefromdifferentdatabasedata,andthesearecompletelytransparenttousers,Distributeddatabasewillensurethatanydistributed6dataupdateintegrity,Copycanenableustomaintainmultipledataavailable,theusercanworkindependently,andthenwillbedonebymodifiedmergedintothedatabase,SQLServer2000relationaldatabaseenginecanfullyprotectdataintegrity,stillcanbemodifieddatabasemanagementconcurrentcosttoaminimum.Easytoinstall,deploymentanduse:SQLServer2000byaseriesofmanagementanddevelopmenttools,thesetoolsatmultiplesitesonSQLServerinstallation,deploy,manageandusemoreeasily.DeveloperscanmorequicklydeliverSQLServerapplicationsandrequiresonlytheleastinstallationandmanagementcanachievetheseapplications.Datawarehouse:ThedatawarehouseisSQLServer2000containsforanalysisandsummarydataanalysisonon-lineanalyticalprocessingtools.ThisfunctiononlyinOracleandothermoreexpensiveDBMS.1.1.1SQLServer2000newfeaturesFullyexpandedtheSQLServer7.0performance,reliabilityandusability.Increasestherangeoffunctions,specificasfollows:IntheaspectofrelationaldatabaseGraphicsmanagementenhancementThecombinationofenhanceddatabaseserver1.2SQLServer2000tools,andutilities1,enterprisemanagement,servicemanagement3,4,eventdetectionqueryparsers5and6,theinputandoutputdatanetwork,serverclienttousetools,toolsInternetuseonlinedocumentation1.2.1enterprisemanagementEnterpriseManagementisbasedonanewcalledMicrosoftManagementConsole(r)ofpublicManagementMicrosoftServerManagementenvironment,itistheSQLServer2000inoneofthemostimportantManagementtools.Enterprisemanagementcannotonlyconfigurationsystemenvironmentandmanagement,butalsobecauseitSQLServercancascadeformtolistalltheSQLServerobject,soallthe7SQLServerobjectofestablishmentandmanagementcanbeaccomplishedbyit.1.2.2ServiceManager(up)ServiceSQLServerservicemanagerisinpracticalworkwhentheServerismostpracticalprogram,servicemanagementistostart,stop,andcontinuetosuspendthereal-timedatabaseServerservice,theserviceprovidedtypesinclude:SQLServer,SQLServerproxy,Microsoftsearchanddistributedcoordination,etc.8外文翻译JSP和SQLServer2000相关介绍JSP(JavaServerPages)是由SunMicrosystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。JSP技术有点类似ASP技术,它是在传统的网页HTML文(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件(*.jsp)。用JSP开发的Web应用是跨平台的,即能在Linux下运行,也能在其他操作系统上运行。JSP技术使用Java编程语言编写类XML的tags和scriptlets,来封装产生动态网页的处理逻辑。网页还能通过tags和scriptlets访问存在于服务端的资源的应用逻辑。JSP将网页逻辑与网页设计和显示分离,支持可重用的基于组件的设计,使基于Web的应用程序的开发变得迅速和容易。Web服务器在遇到访问JSP网页的请求时,首先执行其中的程序段,然后将执行结果连同JSP文件中的HTML代码一起返回给客户。插入的Java程序段可以操作数据库、重新定向网页等,以实现建立动态网页所需要的功能。JSP与JavaServlet一样,是在服务器端执行的,通常返回该客户端的就是一个HTML文本,因此客户端只要有浏览器就能浏览。JSP的1.0规范的最后版本是1999年9月推出的,12月又推出了1.1规范。目前较新的是JSP1.2规范,JSP2.0规范的征求意见稿也已出台。JSP页面由HTML代码和嵌入其中的Java代码所组成。服务器在页面被客户端请求以后对这些Java代码进行处理,然后将生成的HTML页面返回给客户端的浏览器。JavaServlet是JSP的技术基础,而且大型的Web应用程序的开发需要JavaServlet和JSP配合才能完成。JSP具备了Java技术的简单易用,完全的面向对象,具有平台无关性且安全可靠,主要面向因特网的所有特点。JSP技术的强势(1)一次编写,到处运行。在这一点上Java比PHP更出色,除了系统之外,代码不用做任何更改。(2)系统的多平台支持。基本上可以在所有平台上的任意环境中开发,在任意环境中进行系统部署,在任意环境中扩展。相比ASP/PHP的局限性是显而易见的。(3)强大的可伸缩性。从只有一个小的Jar文件就可以运行Servlet/JSP,到由多台服务器进行集群和负载均衡,到多台Application进行事务处理,消息处理,一台服务器到无数台服务器,Java显示了一个巨大的生命力。(4)多样化和功能强大的开发工具支持。这一点与ASP很像,Java已经有了许多非常优秀的开发工具,而且许多可以免费得到,并且其中许多已经可以顺利的运行于多种平台之下。JSP技术的弱势(1)与ASP一样,Java的一些优势正是它致命的问题所在。正是由于为了跨平台的功能,为了极度的伸缩能力,所以极大的增加了产品的复杂性。(2)Java的运行速度是用class常驻内存来完成的,所以它在一些情况下所使用的内存比起用户数量来说确实是“最低性能价格比”了。从另一方面,它还需要硬盘空间来储存一系列的.java文件和.class文件,以及对应的版本文件。JSP六种内置对象:9request,response,out,session,application,config,pagecontext,page,exception.一.request对象:该对象封装了用户提交的信息,通过调用该对象相应的方法可以获取封装的信息,即使用该对象可以获取用户提交信息。二.response对象:对客户的请求做出动态的响应,向客户端发送数据。三session对象1.什么是session:session对象是一个JSP内置对象,它在第一个JSP页面被装载时自动创建,完成会话期管理。从一个客户打开浏览器并连接到服务器开始,到客户关闭浏览器离开这个服务器结束,被称为一个会话。当一个客户访问一个服务器时,可能会在这个服务器的几个页面之间反复连接,反复刷新一个页面,服务器应当通过某种办法知道这是同一个客户,这就需要session对象。2session对象的ID:当一个客户首次访问服务器上的一个JSP页面时,JSP引擎产生一个session对象,同时分配一个String类型的ID号,JSP引擎同时将这个ID号发送到客户端,存放在Cookie中,这样session对象和客户之间就建立了一一对应的关系。当客户再访问连接该服务器的其他页面时,不再分配给客户新的session对象,直到客户关闭浏览器后,服务器端该客户的session对象才取消,并且和客户的会话对应关系消失。当客户重新打开浏览器再连接到该服务器时,服务器为该客户再创建一个新的session对象。四aplication对象1什么是application:服务器启动后就产生了这个application对象,当客户再所访问的网站的各个页面之间浏览时,这个application对象都是同一个,直到服务器关闭。但是与session不同的是,所有客户的application对象都是同一个,即所有客户共享这个内置的application对象。2application对象常用方法:(1)publicvoidsetAttribute(Stringkey,Objectobj):将参数Object指定的对象obj添加到application对象中,并为添加的对象指定一个索引关键字。(2)publicObjectgetAttribute(Stringkey):获取application对象中含有关键字的对象。五out对象out对象是一个输出流,用来向客户端输出数据。out对象用于各种数据的输出。六Cookie1.什么是Cookie:Cookie是Web服务器保存在用户硬盘上的一段文本。Cookie允许一个Web站点在用户的电脑上保存信息并且随后再取回它。举例来说,一个Web站点可能会为每一个访问者产生一个唯一的ID,然后以Cookie文件的形式保存在每个用户的机器上。如果您使用IE浏览器访问Web,您会看到所有保存在您的硬盘上的Cookie。它们最常存放的地方是:c:windowscookies(在Window2000中则是C:DocumentsandSettings您的用户名Cookies)Cookie是以“关键字key=值value“的格式来保存纪录的.102创建一个Cookie对象,调用Cookie对象的构造函数可以创建Cookie。Cookie对象的构造函数有两个字符串参数:Cookie名字和Cookie值。Cookiec=newCookie(“username”,”john”);3JSP中如果要将封装好的Cookie对象传送到客户端,使用response的addCookie()方法。格式:response.addCookie(c)4读取保存到客户端的Cookie,使用request对象的getCookies()方法,执行时将所有客户端传来的Cookie对象以数组的形式排列,如果要取出符合需要的Cookie对象,就需要循环比较数组内每个对象的关键字。Struts是Apache软件基金会(ASF)赞助的一个开源项目。它最初是Jakarta项目中的一个子项目,并在2004年3月成为ASF的顶级项目。它通过采用JavaServlet/JSP技术,实现了基于JavaEEWeb应用的Model-View-ControllerMVC设计模式的应用框架WebFramework,是MVC经典设计模式中的一个经典产品。在JavaEE的Web应用发展的初期,除了使用Servlet技术以外,普遍是在JavaServerPages(JSP)的源代码中,采用HTML与Java代码混合的方式进行开发。因为这两种方式不可避免的要把表现与业务逻辑代码混合在一起,都给前期开发与后期维护带来巨大的复杂度。为了摆脱上述的约束与局限,把业务逻辑代码从表现层中清晰的分离出来,2000年,CraigMcClanahan采用了MVC的设计模式开发Struts。后来该框架产品一度被认为是最广泛、最流行JAVA的WEB应用框架。SQLServer关系数据库简介1、SQLServer是由Microsoft开发和推广的关系数据库系统(DBMS),它最初是由Microsoft、Sybase和Ashton-Tate三家公司共同开发的,并于1988年推出了第一个OS/2版本。2、关系数据库(RDBMS)管理

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论