jsp動(dòng)態(tài)網(wǎng)站技術(shù)-外文文獻(xiàn)翻譯大學(xué)論文_第1頁(yè)
jsp動(dòng)態(tài)網(wǎng)站技術(shù)-外文文獻(xiàn)翻譯大學(xué)論文_第2頁(yè)
jsp動(dòng)態(tài)網(wǎng)站技術(shù)-外文文獻(xiàn)翻譯大學(xué)論文_第3頁(yè)
jsp動(dòng)態(tài)網(wǎng)站技術(shù)-外文文獻(xiàn)翻譯大學(xué)論文_第4頁(yè)
jsp動(dòng)態(tài)網(wǎng)站技術(shù)-外文文獻(xiàn)翻譯大學(xué)論文_第5頁(yè)
已閱讀5頁(yè),還剩5頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

大學(xué)教務(wù)處第28頁(yè)JSPdynamicwebtechnologyJSP(JavaServerPages)isinitiatedbySunMicrosystems,Inc.,withmanycompaniestoparticipateintheestablishmentofadynamicwebpagetechnicalstandards.JSPtechnologysomewhatsimilartoASPtechnology,itisinthetraditionalHTMLpagesinthedocumentparagraphinsertedJAVAprocedures(Scriptlet)andJSPtag(tag),thusJSPdocuments.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.

JSPdynamicwebsitedevelopmentandtechnology.EarlydynamicwebsitedevelopmentandtechnologyusingaCGI-BINinterface.DeveloperstowriteinterfaceswiththerelevantproceduresandaseparateWeb-basedapplications,thelatterthroughtheWebservertocalltheformer.Thisdevelopmenttechnologythereisaseriousexpansionoftheproblem-eachnewCGIproceduralrequirementsontheserveraddanewprocess.Ifmultipleuserswithaccesstotheprogram,theseprocesseswillrunoutoftheWebserveralltheresourcesavailable,untilitscollapse.InordertoovercomethedisadvantagesoftheproposedMicrosoftActiveServerPages(ASP)technology,whichusethe"plug-in"andAPIsimplifiesWebapplicationdevelopment.CGIandASPcomparedtoitsadvantagescanincludeHTMLtags,candirectlyaccessthedatabaseandtheuseofunlimitedexpansionoftheActiveXcontrol,sotheprocedureonthepreparationofamoreflexible.ButthetechnologyisbasicallylimitedtoMicrosoftoperatingsystemplatform,themainworkenvironmentisMicrosoft'sIISapplicationstructure,theASPtechnologycannoteasilyachievecross-platformWebserverprogramdevelopment.HypertextPreprocessor(HypertextPre-processor),PHPdynamicwebsitedevelopmentandtechnologysimilartoASP,isalsoakindofembeddedinHTMLdocumentserver-sidescriptinglanguage.MostofitsgrammarandC,Java,Perl,andothersimilarlanguageandformeditsownuniquestyle,useofthelanguageWebprogrammerscanquicklydevelopdynamicpages.PHPinmostUnixplatforms,GUN/LinuxandMicrosoftWindowsplatformcanrun.PHP'smainadvantagesare:easeofinstallation,thelearningprocesssimpledatabaseconnectionconvenience,compatibilitystrongexpansionofthestrongcanobject-orientedprogramming,andsoon.However,PHP,therearesomeweaknesses,mainlyPHPisaninterpretationoflanguage,nottosupportmulti-threadedstructure,thesupportplatformanddatabaseconnectionsarelimited,especiallyinsupportofthestandardswithregardtoinherentweaknesses,forsomee-commerceapplications,PHPisnotappropriate.TherearealsotechnologiessuchasJavaServletstechnology,makeuseofthetechnologycanbeeasilypreparedusingtheJavalanguageinteractiveserver-sidecode.AJavaServletsisaJava-basedtechnologyrunningontheserver-sideprogram(andAppletdifferent,thelatterrunninginthebrowser).DeveloperstowritesuchaJavaServlets,toreceivefromtheWebbrowser'sHTTPrequest,togenerateadynamicresponse(mayneedtoquerythedatabasetocompletesucharequest),thensendHTMLorXMLdocumentsresponsetothebrowser.Thetechnologyforordinarypagesdesignerstoeasilygraspitisverydifficult.Thisapproach,theentirepageintheJavaServletsaretobecreated.IfthedevelopersormanagerswanttoadjustWebpagesthathavetoeditandre-buildtheJavaServlets.SunMicrosystems(SunMicrosystemsInc.)InWebservers,applicationservers,thetradingsystemanddevelopmenttoolsproviderofbroadsupportandcooperation,integrationandbalancealreadyexistsintheJavaprogrammingenvironment(suchasJavaServletsandJavaBeans)Tosupportthetechnologyandtoolshaveanew,Web-basedapplicationdevelopmentmethods-JavaServerPagesTechnology(JSP).Thisdynamicwebsitedevelopmentandtechnologymainlyhavethefollowingcharacteristics:ToanyWeborapplicationserverrunningon;Fromtheapplicationoflogicanddisplaypages;Tocarryouttherapiddevelopmentandtesting;SimplifiesthedevelopmentofWeb-basedinteractiveapplicationsfortheprocess.JSPtechnologymethodsInordertofacilitatetherapidanddynamicdevelopmentofthesite,JSPinthefollowingareasmadeimprovements,makingitarapidestablishmentofcross-platformdynamicsite'spreferredoption.Willgenerateanddisplaythecontentsofseparation

UsingJSPtechnology,WebpagesanddeveloperscanuseHTMLorXMLlogodesignandformattingthefinalpages,andusetheJSPlogoorlegshadgenerateddynamiccontentonthepage(thecontentisbasedonchangesintherequest,forexample,requestaccountinformationAbottleofwineoraspecificprice,etc.).ContentgeneratedbythelogicofthelogoandpackagingJavaBeanscomponents,andtiedupinthescript,allofthescriptsintheserver-siderun.AsthecorelogicinthelogoandpackagingwasintheJavaBeans,Webpagedesignersandmanagementpersonnel,willbeabletoeditanduseJSPpagesandwillnotaffectthecontentgenerated.Intheserver,JSPengineexplainedJSPlogoandscript,generatedbythecontentoftherequest(forexample,byvisitingJavaBeanscomponents,theuseofJDBCtoaccessthedatabaseorcontain),andwillresultinHTML(orXML)pagesintheformofsendingBacktothebrowser.Thishelpstoprotectthemselvesfromthecode,canguaranteethatanyHTML-basedWebbrowser'scompleteavailability.

2.Reusablecomponents

ThevastmajorityofJSPpagesrelyonreusable,cross-platformcomponents(JavaBeansorEnterpriseJavaBeanscomponents)toimplementtheproceduresrequiredbytheapplicationofthecomplexityoftreatment.Developerstoshareandexchangetheimplementationofthegeneraloperationofthecomponents,ormakethesecomponentsformoreusersandgroupsusedbythecustomer.Component-basedmethodstoacceleratetheoveralldevelopmentprocessandenableorganizationsofallkindsintheirexistingskillsandoptimizetheresultsofdevelopmenteffortsinthebalance.

3.UseoflogoWebpagedevelopersarenotfamiliarwiththescriptinglanguageprogrammers.JSPtechnologypackagehasmanyfunctions,whichisineasy-to-use,XMLandJSPrelatedtotheidentificationofdynamiccontentgenerationneeds.JSPstandardlogotoaccessandexamplesofJavaBeanscomponents,componentattributesetorretrieve,downloadApplet,andtheimplementationofothermethodsmoredifficulttocodingandtime-consumingfunction.

4.Adaptationplatform

AlmostallplatformssupportJava,JSP+JavaBeansalmostallplatformsunimpededaccess.Fromaporttoanotherplatform,JSPandJavaBeansdonotevenhavetorecompile,becauseJavabytecodestandardsandareplatform-independent.

5.Databaseconnection

JavainthedatabaselinkingthetechnologyisJDBC,JavaprogramthroughJDBCdriveranddatabaselinkedtotheimplementationofenquiries,suchasdataextractionoperation.SunhasalsodevelopedaJDBC-ODBCbridge,useofthistechnologywithJavaprogramscanaccessthedatabaseODBCdriver,themajorityofdatabasesystemscomewithODBCdriver.Inaddition,throughthedevelopmentofthelogo,JSPtechnologycanbefurtherexpanded.Third-partydevelopersandotherpersonnelforthecommonfunctionscancreatetheirownlogofor.ThismakesWebpagedeveloperscanusefamiliartoolsandthesamelogoastheimplementationofspecificfeaturesofthecomponenttotheirwork.JSPtechnologyeasilyintegratedintoavarietyofapplicationsinarchitecture,tousetheexistingtoolsandskills,andbeextendedtosupportenterprise-classdistributedapplications.UseofJavatechnologyaspartofthefamily,andtheJava2(EnterpriseArchitecture)anintegralpartof,JSPtechnologycansupportthehighlycomplexWeb-basedapplications.JSPpagesbecauseofthebuilt-inscriptinglanguageisbasedonJava,andalloftheJSPpageshavebeencompiledintoJavaServlets,soJSPpageswithallthebenefitsofJavatechnology,includingrobuststoragemanagementandsecurity.AspartoftheJavaplatform,JSPwiththeJavaprogramminglanguage,"apreparation,theentireoperation"characteristics.

JSPapplicationofthemodel.JSPpagesusuallybeencompiledintoJavaServlets,thisisastandardJavaextension.PagesdeveloperstovisitalloftheJavaapplicationenvironment,totakeadvantageofJavatechnologyandtheexpansionofportability.Thismakesthenextpageofthecall,theserverwillbeveryquickresponse(whichavoidstheCGI-BINforeachHTTPrequesttogenerateanewprocess).JSPpagescancontainavarietyofdifferentapplicationsinarchitectureormodel,canbeusedbydifferentagreements,partsandcomponentsbytheformatoftheCommonwealth.BasedonthedynamicinformationdisseminationandJSPtechnologyisanopen,scalablecreatedynamicWebpagesstandards.Regardlessofwhatusedtocreatetools,developerscanuseJSPpagestocreateaportableWebapplications,indifferentWebserverapplicationstorunon.

JSP動(dòng)態(tài)網(wǎng)站技術(shù):JSP(JavaServerPages)是由SunMicrosystems公司倡導(dǎo)、許多公司參與一起建立的一種動(dòng)態(tài)網(wǎng)頁(yè)技術(shù)標(biāo)準(zhǔn)。JSP技術(shù)有點(diǎn)類似ASP技術(shù),它是在傳統(tǒng)的網(wǎng)頁(yè)HTML文件中插入JAVA程序段(Scriptlet)和JSP標(biāo)記(tag),從而形成JSP文件。用JSP開(kāi)發(fā)的Web應(yīng)用是跨平臺(tái)的,即能在Linux下運(yùn)行,也能在其他操作系統(tǒng)上運(yùn)行。JSP技術(shù)使用Java編程語(yǔ)言編寫類XML的tags和scriptlets,來(lái)封裝產(chǎn)生動(dòng)態(tài)網(wǎng)頁(yè)的處理邏輯。網(wǎng)頁(yè)還能通過(guò)tags和scriptlets訪問(wèn)存在于服務(wù)端的資源的應(yīng)用邏輯。JSP將網(wǎng)頁(yè)邏輯與網(wǎng)頁(yè)設(shè)計(jì)和顯示分離,支持可重用的基于組件的設(shè)計(jì),使基于Web的應(yīng)用程序的開(kāi)發(fā)變得迅速和容易。Web服務(wù)器在遇到訪問(wèn)JSP網(wǎng)頁(yè)的請(qǐng)求時(shí),首先執(zhí)行其中的程序段,然后將執(zhí)行結(jié)果連同JSP文件中的HTML代碼一起返回給客戶。插入的Java程序段可以操作數(shù)據(jù)庫(kù)、重新定向網(wǎng)頁(yè)等,以實(shí)現(xiàn)建立動(dòng)態(tài)網(wǎng)頁(yè)所需要的功能。JSP與JavaServlet一樣,是在服務(wù)器端執(zhí)行的,通常返回該客戶端的就是一個(gè)HTML文本,因此客戶端只要有瀏覽器就能瀏覽。JSP的1.0規(guī)范的最后版本是1999年9月推出的,12月又推出了1.1規(guī)范。目前較新的是JSP1.2規(guī)范,JSP2.0規(guī)范的征求意見(jiàn)稿也已出臺(tái)。JSP頁(yè)面由HTML代碼和嵌入其中的Java代碼所組成。服務(wù)器在頁(yè)面被客戶端請(qǐng)求以后對(duì)這些Java代碼進(jìn)行處理,然后將生成的HTML頁(yè)面返回給客戶端的瀏覽器。JavaServlet是JSP的技術(shù)基礎(chǔ),而且大型的Web應(yīng)用程序的開(kāi)發(fā)需要JavaServlet和JSP配合才能完成。JSP具備了Java技術(shù)的簡(jiǎn)單易用,完全的面向?qū)ο?,具有平臺(tái)無(wú)關(guān)性且安全可靠,主要面向因特網(wǎng)的所有特點(diǎn)。

\o"返回頁(yè)首"\o"返回頁(yè)首"JSP動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)技術(shù)早期的動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)技術(shù)使用的是CGI-BIN接口。開(kāi)發(fā)人員編寫與接口相關(guān)的單獨(dú)的程序和基于Web的應(yīng)用程序,后者通過(guò)Web服務(wù)器來(lái)調(diào)用前者。這種開(kāi)發(fā)技術(shù)存在著嚴(yán)重的擴(kuò)展性問(wèn)題——每一個(gè)新的CGI程序要求在服務(wù)器上新增一個(gè)進(jìn)程。如果多個(gè)用戶并發(fā)地訪問(wèn)該程序,這些進(jìn)程將耗盡該Web服務(wù)器所有的可用資源,直至其崩潰。為克服這一弊端,微軟公司提出了ActiveServerPages(ASP)技術(shù),該技術(shù)利用“插件”和API簡(jiǎn)化了Web應(yīng)用程序的開(kāi)發(fā)。ASP與CGI相比,其優(yōu)點(diǎn)是可以包含HTML標(biāo)簽,可以直接存取數(shù)據(jù)庫(kù)及使用無(wú)限擴(kuò)充的ActiveX控件,因此在程序編制上更富有靈活性。但該技術(shù)基本上是局限于微軟的操作系統(tǒng)平臺(tái)之上,主要工作環(huán)境是微軟的IIS應(yīng)用程序結(jié)構(gòu),所以ASP技術(shù)不能很容易地實(shí)現(xiàn)跨平臺(tái)的Web服務(wù)器程序開(kāi)發(fā)。HypertextPreprocessor(超文本預(yù)處理器),即PHP動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)技術(shù)與ASP相似,也是一種嵌入HTML文檔的服務(wù)器端腳本語(yǔ)言。其語(yǔ)法大部分與C、Java、Perl等語(yǔ)言相似,并形成了自己的獨(dú)有風(fēng)格,利用該語(yǔ)言Web程序員可以快速地開(kāi)發(fā)出動(dòng)態(tài)網(wǎng)頁(yè)。PHP在大多數(shù)Unix平臺(tái)、GUN/Linux和微軟Windows平臺(tái)上均可以運(yùn)行。PHP的優(yōu)點(diǎn)主要有:安裝方便,學(xué)習(xí)過(guò)程簡(jiǎn)單;數(shù)據(jù)庫(kù)連接方便,兼容性強(qiáng);擴(kuò)展性強(qiáng);可以進(jìn)行面向?qū)ο缶幊痰取5玃HP也存在一些弱點(diǎn),主要是PHP是一種解釋型語(yǔ)言,不支持多線程結(jié)構(gòu),支持平臺(tái)和連接的數(shù)據(jù)庫(kù)都有限,特別是在支持的標(biāo)準(zhǔn)方面存在先天不足,對(duì)于某些電子商務(wù)應(yīng)用來(lái)說(shuō),PHP是不適合的。還有一些技術(shù),如JavaServlets技術(shù),利用該技術(shù)可以很容易地用Java語(yǔ)言編寫交互式的服務(wù)器端代碼。一個(gè)JavaServlets就是一個(gè)基于Java技術(shù)的運(yùn)行在服務(wù)器端的程序(與Applet不同,后者運(yùn)行在瀏覽器端)。開(kāi)發(fā)人員編寫這樣的JavaServlets,以接收來(lái)自Web瀏覽器的HTTP請(qǐng)求,動(dòng)態(tài)地生成響應(yīng)(可能需要查詢數(shù)據(jù)庫(kù)來(lái)完成這種請(qǐng)求),然后發(fā)送包含HTML或XML文檔的響應(yīng)到瀏覽器。這種技術(shù)對(duì)于普通的頁(yè)面設(shè)計(jì)者來(lái)說(shuō)要輕易地掌握是很困難的。采用這種方法,整個(gè)網(wǎng)頁(yè)必須都在JavaServlets中制作。如果開(kāi)發(fā)人員或者Web管理人員想要調(diào)整頁(yè)面顯示,就不得不編輯并重新編譯該JavaServlets。

太陽(yáng)微系統(tǒng)公司(SunMicrosystemsInc.)在Web服務(wù)器、應(yīng)用服務(wù)器、交易系統(tǒng)以及開(kāi)發(fā)工具供應(yīng)商間廣泛支持與合作下,整合并平衡了已經(jīng)存在的對(duì)Java編程環(huán)境(例如JavaServlets和JavaBeans)進(jìn)行支持的技術(shù)和工具后產(chǎn)生了一種新的、開(kāi)發(fā)基于Web應(yīng)用程序的方法——JavaServerPages技術(shù)(JSP)。這種動(dòng)態(tài)網(wǎng)站開(kāi)發(fā)技術(shù)主要有以下一些特點(diǎn):能夠在任何Web或應(yīng)用程序服務(wù)器上運(yùn)行;

分離了應(yīng)用程序的邏輯和頁(yè)面顯示;

能夠進(jìn)行快速的開(kāi)發(fā)和測(cè)試;

簡(jiǎn)化了開(kāi)發(fā)基于Web的交互式應(yīng)用程序的過(guò)程。JSP的技術(shù)方法

為了快速方便地進(jìn)行動(dòng)態(tài)網(wǎng)站的開(kāi)發(fā),JSP在以下幾個(gè)方面做了改進(jìn),使其成為快速建立跨平臺(tái)的動(dòng)態(tài)網(wǎng)站的首選方案。

1.將內(nèi)容的生成和顯示進(jìn)行分離

用JSP技術(shù),Web頁(yè)面開(kāi)發(fā)人員可以使用HTML或者XML標(biāo)識(shí)來(lái)設(shè)計(jì)和格式化最終頁(yè)面,并使用JSP標(biāo)識(shí)或者小腳本來(lái)生成頁(yè)面上的動(dòng)態(tài)內(nèi)容(內(nèi)容是根據(jù)請(qǐng)求變化的,例如請(qǐng)求賬戶信息或者特定的一瓶酒的價(jià)格等)。生成內(nèi)容的邏輯被封裝在標(biāo)識(shí)和JavaBeans組件中,并且捆綁在腳本中,所有的腳本在服務(wù)器端運(yùn)行。由于核心邏輯被封裝在標(biāo)識(shí)和JavaBeans中,所以Web管理人員和頁(yè)面設(shè)計(jì)者,能夠編輯和使用JSP頁(yè)面,而不影響內(nèi)容的生成。

在服務(wù)器端,J

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝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ù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 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ì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論