版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
外文引用THETECHNIQUEDEVELOPMENTHISTORYOFJSPBy:KathySierraandBertBatesSource:Servlet&JSPTheJavaServerPages(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.GENERALIZETheJSP(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.SOURCEOFJSP ThetechniqueofJSPofthecompanyofSun,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.JSPCHARACTERISTICSIsaserviceaccordingtothescriptlanguageinsomeonelanguageofthestaturessystemthiskindofdiscuss,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.JSPMECHANISMTocomprehendtheJSPhowunitethetechnicaladvantagethatabovevariousspeakof,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,thepeoplealwaysatlookforthebettermethodofbuilduptheWebapplicationprocedure,themodulespreadsincustomer'smachine/servertherealm.JavaBeansandActiveXwerepublishedthecompanytoexpandtoapplytheproceduredeveloperforJavaandWindowstousetocometodevelopthecomplicatedprocedurequicklyby"thefastapplicationproceduredevelopment"(RAD)tool.Thesetechniquesmaketheexpertinthesomerealmbeabletowritethemodulefortheperpendicularapplicationplaitintheskillarea,butthedevelopercangofetchtheusagedirectlybutneednotcontroltheexpertiseofthisrealm.Beakindoftakemoduleasthecentraldevelopmentterrace,theJSPappeared.ItwiththeJavaBeansandEnterpriseJavaBeans(EJB)moduleincludesthemodelofthebusinessandthedatalogicforfoundation,provideagreatdealoflabelandascriptterracestousetocometoshowintheHTMLpagefromthecontentsofJavaBeanscreationorsendapresentinreturn.BecauseofthepropertythatregardsthemoduleasthecenteroftheJSP,itcandriveJavaandnotthedeveloperofJavausesequally.NotthedeveloperofJavacanpasstheJSPlabel(Tags)tousetheJavaBeansthatthedeluxedeveloperofJavaestablish.ThedeveloperofJavanotonlycanestablishandusetheJavaBeans,butalsocanusethelanguageofJavatocometocontrolmoreaccuratelyintheJSPpageaccordingtotheexpressionlogicofthefirstfloorJavaBeans.SeenowhowJSPishandleclaimofHTTP.Inbasicclaimmodel,aclaimdirectlywassendtoJSPpagein.ThecodeofJSPcontrolstocarryonhourofthelogicprocessingandmoduleofJavaBeanses'handoverwitheachother,andthemanifestationresultindynamicstatebornly,mixingwiththeHTMLpageofthestaticstateHTMLcode.TheBeanscanbeJavaBeansormoduleofEJBs.Moreover,themorecomplicatedclaimmodelcanseemakefromisrequestotherJSPpagesofthepagecallsignorJavaServlets.TheengineofJSPwantstochasethecodeofJavathatthelabelofJSP,codeofJavaintheJSPpageevenallconvertsintothebigpiecetogetherwiththestaticstateHTMLcontentsactually.ThesecodespiecewasorganizedtheJavaServletthatcustomercannotseetogotobytheengineofJSP,thentheServleteditsandtranslatethemautomaticallybytecodeofJava.Thus,thevisitantthatisthewebsiterequestsaJSPpage,undertheconditionofitisnotknowing,analreadyborn,theServletactualfullgeneralthatpreparedtoeditandtranslatecompletesallworks,veryconcealmentbutagainandefficiently.TheServletistoeditandtranslateof,sothecodeofJSPinthewebpagedoesnotneedwhentheeverytimerequeststhatpageisexplain.TheengineofJSPneedtobeeditandtranslateafterServletthecodeendismodifyonlyonce,thenthisServletthatedittedandtranslatecanbecarryout.TheinviewofthefactJSPengineautoisborntoeditandtranslatetheServletalso,neednotprocedurememberbeginstoeditandtranslatethecode,sotheJSPcanbringvividsexthatfunctionandfastdevelopmentsneedthatyouareefficiently.ComparedwiththetraditionalCGI,theJSPhastheequaladvantage.First,onthespeed,thetraditionalprocedureofCGIneedstousethestandardimportationofthesystemtooutputtheequipmentstocarryoutthedynamicstatewebpageborn,buttheJSPisdirectismutuallytheconnectionwithserver.AndsayfortheCGI,eachinterviewneedstoaddtoaddaprogresstohandle,theprogressbuildupanddestroybyburningconstantlyandwillbeanotsmallburdenforcalculatorofbetheserverofWeb.Thenextinorder,theJSPisspecializedtodevelopbutdesignfortheWebof,itspurposeisforbuildingupaccordingtotheWebappliedprocedure,includedthenormandthetoolofathewholeset.UsethetechniqueofJSPcancombinealotofJSPpagestobecomeaWebapplicationprocedureveryexpediently.
中文翻譯JSP的技術(shù)發(fā)展歷史作者:KathySierraandBertBates來源:Servlet&JSPJavaServerPages(JSP)是一種基于web的腳本編程技術(shù),類似于網(wǎng)景公司的服務(wù)器端Java腳本語言server-sideJavaScript(SSJS)和微軟的ActiveServerPages(ASP)。與SSJS和ASP相比,JSP具有更好的可擴(kuò)展性,并且它不專屬于任何一家廠商或某一特定的Web服務(wù)器。盡管JSP規(guī)范是由Sun公司制定的,但任何廠商都可以在自己的系統(tǒng)上實(shí)現(xiàn)JSP。在Sun正式發(fā)布JSP(JavaServerPages)之后,這種新的Web應(yīng)用開發(fā)技術(shù)很快引起了人們的關(guān)注。JSP為創(chuàng)建高度動(dòng)態(tài)的Web應(yīng)用提供了一個(gè)獨(dú)特的開發(fā)環(huán)境。按照Sun的說法,JSP能夠適應(yīng)市場(chǎng)上包括ApacheWebServer、IIS4.0在內(nèi)的85%的服務(wù)器產(chǎn)品。本文將介紹JSP相關(guān)的知識(shí),以及JavaBean的相關(guān)內(nèi)容,當(dāng)然都是比較粗略的介紹其中的基本內(nèi)容,僅僅起到拋磚引玉的作用,如果讀者需要更詳細(xì)的信息,請(qǐng)參考相應(yīng)的JSP的書籍。概述JSP(JavaServerPages)是由SunMicrosystems公司倡導(dǎo)、許多公司參與一起建立的一種動(dòng)態(tài)網(wǎng)頁(yè)技術(shù)標(biāo)準(zhǔn),其在動(dòng)態(tài)網(wǎng)頁(yè)的建設(shè)中有其強(qiáng)大而特別的功能。JSP與Microsoft的ASP技術(shù)非常相似。兩者都提供在HTML代碼中混合某種程序代碼、由語言引擎解釋執(zhí)行程序代碼的能力。下面我們簡(jiǎn)單的對(duì)它進(jìn)行介紹。JSP頁(yè)面最終會(huì)轉(zhuǎn)換成servlet。因而,從根本上,JSP頁(yè)面能夠執(zhí)行的任何任務(wù)都可以用servlet來完成。然而,這種底層的等同性并不意味著servlet和JSP頁(yè)面對(duì)于所有的情況都等同適用。問題不在于技術(shù)的能力,而是二者在便利性、生產(chǎn)率和可維護(hù)性上的不同。畢竟,在特定平臺(tái)上能夠用Java編程語言完成的事情,同樣可以用匯編語言來完成,但是選擇哪種語言依舊十分重要。和單獨(dú)使用servlet相比,JSP提供下述好處:JSP中HTML的編寫與維護(hù)更為簡(jiǎn)單。JSP中可以使用常規(guī)的HTML:沒有額外的反斜杠,沒有額外的雙引號(hào),也沒有暗含的Java語法。能夠使用標(biāo)準(zhǔn)的網(wǎng)站開發(fā)工具。即使是那些對(duì)JSP一無所知的HTML工具,我們也可以使用,因?yàn)樗鼈儠?huì)忽略JSP標(biāo)簽(JSPtags)。可以對(duì)開發(fā)團(tuán)隊(duì)進(jìn)行劃分。Java程序員可以致力于動(dòng)態(tài)代碼。Web開發(fā)人員可以將經(jīng)理集中在表示層(presentationlayer)上。對(duì)于大型的項(xiàng)目,這種劃分極為重要。依據(jù)開發(fā)團(tuán)隊(duì)的大小,及項(xiàng)目的復(fù)雜程度,可以對(duì)靜態(tài)HTML和動(dòng)態(tài)內(nèi)容進(jìn)行弱分離(weakerseparation)和強(qiáng)分離(strongerseparation)。此處的討論并不是說人們應(yīng)該放棄使用servlet而僅僅使用JSP。事實(shí)上,幾乎所有的項(xiàng)目都會(huì)同時(shí)用到這兩種技術(shù)。在某些項(xiàng)目中,更適宜選用servlet,而針對(duì)項(xiàng)目中的某些請(qǐng)求,我們可能會(huì)在MVC構(gòu)架下組合使用這兩項(xiàng)技術(shù)。我們總是希望用適當(dāng)?shù)墓ぞ咄瓿上鄬?duì)應(yīng)的工作,僅僅是servlet并不一定能夠勝任所有工作。JSP的由來Sun公司的JSP技術(shù),使Web頁(yè)面開發(fā)人員可以使用HTML或者XML標(biāo)識(shí)來設(shè)計(jì)和格式化最終頁(yè)面。使用JSP標(biāo)識(shí)或者小腳本來生成頁(yè)面上的動(dòng)態(tài)內(nèi)容(內(nèi)容是根據(jù)請(qǐng)求來變化的)。JavaServlet是JSP技術(shù)的基礎(chǔ),而且大型的Web應(yīng)用程序的開發(fā)需要JavaServlet和JSP配合才能完成,Servlet這個(gè)名稱源于Applet,現(xiàn)在國(guó)內(nèi)的翻譯方式很多,本書為了避免誤會(huì),決定直接采用Servlet而不做任何翻譯,讀者如果愿意,可以稱之為“小服務(wù)程序”。Servlet其實(shí)和傳統(tǒng)的CGI、ISAPI、NSAPI等Web程序開發(fā)工具的作用是相似的,在使用JavaServlet以后,用戶不必再使用效率低下的CGI方式,也不必使用只能在某個(gè)固定Web服務(wù)器平臺(tái)運(yùn)行的API方式來動(dòng)態(tài)生成Web頁(yè)面。許多Web服務(wù)器都支持Servlet,即使不直接支持Servlet的Web服務(wù)器也可以通過附加的應(yīng)用服務(wù)器和模塊來支持Servlet。得益于Java的跨平臺(tái)的特性,Servlet也是平臺(tái)無關(guān)的,實(shí)際上,只要符合JavaServlet規(guī)范,Servlet是完全與平臺(tái)無關(guān)且是與Web服務(wù)器無關(guān)的。由于JavaServlet內(nèi)部是以線程方式提供服務(wù),不必對(duì)于每個(gè)請(qǐng)求都啟動(dòng)一個(gè)進(jìn)程,并且利用多線程機(jī)制可以同時(shí)為多個(gè)請(qǐng)求服務(wù),因此JavaServlet效率非常高。但JavaServlet也不是沒有缺點(diǎn),和傳統(tǒng)的CGI、ISAPI、NSAPI方式相同,JavaServlet是利用輸出HTML語句來實(shí)現(xiàn)動(dòng)態(tài)網(wǎng)頁(yè)的,如果用JavaServlet來開發(fā)整個(gè)網(wǎng)站,動(dòng)態(tài)部分和靜態(tài)頁(yè)面的整合過程會(huì)非常難以實(shí)現(xiàn)。為了解決JavaServlet的這種缺點(diǎn),SUN推出了JSP。許多年前,Marty受到邀請(qǐng),參加一個(gè)有關(guān)軟件技術(shù)的小型研討會(huì).坐在Marty旁邊的人是JamesGoslingJava編程語言的發(fā)明者。隔幾個(gè)位置,是來自華盛頓一家大型軟件公司的高級(jí)經(jīng)理。在討論過程中,研討會(huì)的主席提出了Jini的議題,這在當(dāng)時(shí)是一項(xiàng)新的Java技術(shù)。主席向該經(jīng)理詢問他的想法.他回答說,雖然現(xiàn)在言之過早,但這看起來會(huì)是非常有前途的一項(xiàng)技術(shù)。他們會(huì)持續(xù)關(guān)注這項(xiàng)技術(shù),如果這項(xiàng)技術(shù)變得流行起來,他們會(huì)遵循公司的“接受并擴(kuò)充(embraceandextend)”的策略.此時(shí),Gosling隨意地插話說“你的意思其實(shí)就是不接受且不擴(kuò)充(disgraceanddistend)?!痹诖?Gosling的抱怨顯示出,他感到這個(gè)公司會(huì)從其他公司那里拿走技術(shù),用于他們自己的目的.出人意料的是,形勢(shì)已經(jīng)完全不同。Java團(tuán)隊(duì)并沒有發(fā)明這一思想將頁(yè)面設(shè)計(jì)成由靜態(tài)HTML和用特殊標(biāo)簽標(biāo)記的動(dòng)態(tài)代碼混合組成.。ColdFusion多年前就已經(jīng)這樣做了。甚至ASP(來自于前述經(jīng)理所在公司的一項(xiàng)產(chǎn)品)都在JSP出現(xiàn)之前推廣了這種方式。實(shí)際上,JSP不只采用了這種通用概念,它甚至使用許多和ASP相同的特殊標(biāo)簽。JSP是建立在Javaservlets模型之上的表達(dá)層技術(shù),它使編寫HTML變得更簡(jiǎn)單。像SSJS一樣,它也允許你將靜態(tài)HTML內(nèi)容與服務(wù)器端腳本混合起來生成動(dòng)態(tài)輸出。JSP把Java作為默認(rèn)的腳本語言,然而,就像ASP可以使用其他語言(如JavaScript和VBScript)一樣,JSP規(guī)范也允許使用其他語言。JSP的特點(diǎn)按照腳本語言是服務(wù)于某一個(gè)子系統(tǒng)的語言這種論述,JSP應(yīng)當(dāng)被看作是一種腳本語言。然而,作為一種腳本語言,JSP又顯得過于強(qiáng)大了,在JSP中幾乎可以使用全部的Java類。作為一種基于文本的、以顯示為中心的開發(fā)技術(shù),JSP提供了JavaServlet的所有好處,并且,當(dāng)與一個(gè)JavaBeans類結(jié)合在一起時(shí),JSP提供了一種使內(nèi)容和顯示邏輯分開的簡(jiǎn)單方式。分開內(nèi)容和顯示邏輯的好處是,更新頁(yè)面外觀的人員不必懂得Java代碼,而更新JavaBeans類的人員也不必是設(shè)計(jì)網(wǎng)頁(yè)的行家里手,就可以用帶JavaBeans類的JSP頁(yè)面來定義Web模板,以建立一個(gè)由具有相似的外觀的頁(yè)面組成的網(wǎng)站。JavaBeans類完成數(shù)據(jù)提供,這樣在模板中就沒有Java代碼,
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年鐵路貨物運(yùn)輸與專用線運(yùn)營(yíng)合同
- 2025年度建筑勞務(wù)分包合同標(biāo)的工程進(jìn)度與質(zhì)量監(jiān)管條款3篇
- 2024年贈(zèng)與股份合同:父子權(quán)益的傳遞與確認(rèn)
- 2024庭院園藝景觀設(shè)計(jì)與生態(tài)修復(fù)工程包工合同范本6篇
- 2024年電子商務(wù)平臺(tái)送貨員聘用合同
- 2024年航空航天產(chǎn)業(yè)投資合作意向書(國(guó)家戰(zhàn)略版)3篇
- 2024年社交媒體品牌建設(shè)與維護(hù)服務(wù)條款3篇
- 2024年版權(quán)許可合同違約責(zé)任認(rèn)定
- 2024年資產(chǎn)重組合同范本
- 2024物業(yè)管理實(shí)務(wù)客戶關(guān)系管理與滿意度調(diào)查合同3篇
- 中國(guó)馬克思主義與當(dāng)代思考題(附答案)
- ESD靜電防護(hù)檢測(cè)及管控標(biāo)準(zhǔn)
- 【求陰影部分面積】五年級(jí)上冊(cè)數(shù)學(xué)必考求陰影部分面積35題2023.9.27
- 結(jié)核病診斷-TSPOT-實(shí)驗(yàn)課件
- 業(yè)主搭建陽(yáng)光房申請(qǐng)書
- 小學(xué)語文分層作業(yè)設(shè)計(jì)案例
- 四川旭虹光電科技有限公司曲面顯示用蓋板玻璃生產(chǎn)項(xiàng)目環(huán)評(píng)報(bào)告
- 傷口愈合的病理生理及濕性愈合理論-課件
- GB/T 24475-2023電梯遠(yuǎn)程報(bào)警系統(tǒng)
- 科技計(jì)劃項(xiàng)目(課題)驗(yàn)收(結(jié)題)經(jīng)費(fèi)審計(jì)業(yè)務(wù)約定書
- SIS系統(tǒng)操作規(guī)程
評(píng)論
0/150
提交評(píng)論