您好,欢迎访问三七文档
外文原文JSPJSP(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,andaplatform-independentandsecure,mainlyforallthecharacteristicsoftheInternet.JavaScript,whichiscompletelydistinctfromtheJavaprogramminglanguage,isnormallyusedtodynamicallygenerateHTMLontheclient,buildingpartsoftheWebpageasthebrowserloadsthedocument.ThisisausefulcapabilityanddoesnotnormallyoverlapwiththecapabilitiesofJSP(whichrunsonlyontheserver).JSPpagesstillincludeSCRIPTtagsforJavaScript,justasnormalHTMLpagesdo.Infact,JSPcanevenbeusedtodynamicallygeneratetheJavaScriptthatwillbesenttotheclient.So,JavaScriptisnotacompetingtechnology;itisacomplementaryone.ItisalsopossibletouseJavaScriptontheserver,mostnotablyonSunONE(formerlyiPlanet),IIS,andBroadVisionservers.However,Javaismorepowerful,flexible,reliable,andportable.JSP(arecursiveacronymforJSP:HypertextPreprocessor)isafree,open-source,HTML-embeddedscriptinglanguagethatissomewhatsimilartobothASPandJSP.OneadvantageofJSPisthatthedynamicpartiswritteninJava,whichalreadyhasanextensiveAPIfornetworking,databaseaccess,distributedobjects,andthelike,whereasPHPrequireslearninganentirelynew,lesswidelyusedlanguage.AsecondadvantageisthatJSPismuchmorewidelysupportedbytoolandservervendorsthanisJSP.VersusPureServlets.JSPdoesn'tprovideanycapabilitiesthatcouldn't,inprinciple,beaccomplishedwithservlets.Infact,JSPdocumentsareautomaticallytranslatedintoservletsbehindthescenes.Butitismoreconvenienttowrite(andtomodify!)regularHTMLthantouseazillionprintlnstatementstogeneratetheHTML.Plus,byseparatingthepresentationfromthecontent,youcanputdifferentpeopleondifferenttasks:yourWebpagedesignexpertscanbuildtheHTMLbyusingfamiliartoolsandeitherleaveplacesforyourservletprogrammerstoinsertthedynamiccontentorinvokethedynamiccontentindirectlybymeansofXMLtags.DoesthismeanthatyoucanjustlearnJSPandforgetaboutservlets?Absolutelynot!JSPdevelopersneedtoknowservletsforfourreasons:a.JSPpagesgettranslatedintoservlets.Youcan'tunderstandhowJSPworkswithoutunderstandingservlets.b.JSPconsistsofstaticHTML,special-purposeJSPtags,andJavacode.WhatkindofJavacode?Servletcode!Youcan'twritethatcodeifyoudon'tunderstandservletprogramming.c.SometasksarebetteraccomplishedbyservletsthanbyJSP.JSPisgoodatgeneratingpagesthatconsistoflargesectionsoffairlywellstructuredHTMLorothercharacterdata.Servletsarebetterforgeneratingbinarydata,buildingpageswithhighlyvariablestructure,andperformingtasks(suchasredirection)thatinvolvelittleornooutput.d.SometasksarebetteraccomplishedbyacombinationofservletsandJSPthanbyeitherservletsorJSPalone.JSPtechnologystrength(1)timetoprepare,runeverywhere.AtthispointJavabetterthanPHP,inadditiontosystems,thecodenottomakeanychanges.(2)themulti-platformsupport.Basicallyonallplatformsofanydevelopmentenvironment,inanyenvironmentfordeploymentinanyenvironmentintheexpansion.ComparedASP/PHPlimitationsareobvious.(3)astrongscalability.FromonlyasmallJardocumentscanrunServletJSP,tothemultipleserversclusteringandloadbalancing,tomultipleApplicationfortransactionprocessing,informationprocessing,aservertonumerousservers,JavashowsatremendousVitality.(4)diversificationandpowerfuldevelopmenttoolssupport.ThisissimilartotheASP,Javaalreadyhavemanyverygooddevelopmenttools,andmanycanbefree,andmanyofthemhavebeenabletorunonavarietyofplatformsunder.JSPtechnologyvulnerable:(1)andthesameASP,Javaistheadvantageofsomeof
本文标题:jsp介绍外文翻译
链接地址:https://www.777doc.com/doc-3818059 .html