jsp介绍外文翻译

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

外文原文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

1 / 11
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功