JSP技术 ---外文文献.docx

上传人:wj 文档编号:351321 上传时间:2023-04-29 格式:DOCX 页数:8 大小:13.35KB
下载 相关 举报
JSP技术 ---外文文献.docx_第1页
第1页 / 共8页
JSP技术 ---外文文献.docx_第2页
第2页 / 共8页
JSP技术 ---外文文献.docx_第3页
第3页 / 共8页
JSP技术 ---外文文献.docx_第4页
第4页 / 共8页
JSP技术 ---外文文献.docx_第5页
第5页 / 共8页
JSP技术 ---外文文献.docx_第6页
第6页 / 共8页
JSP技术 ---外文文献.docx_第7页
第7页 / 共8页
JSP技术 ---外文文献.docx_第8页
第8页 / 共8页
亲,该文档总共8页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

JSP技术 ---外文文献.docx

《JSP技术 ---外文文献.docx》由会员分享,可在线阅读,更多相关《JSP技术 ---外文文献.docx(8页珍藏版)》请在冰点文库上搜索。

JSP技术 ---外文文献.docx

外文文献

JSPTechnologyandServlets

JSPprofile

JSP(JavaServerPages)isinitiatedbySunMicrosystems,Inc.,withmanycompaniestoparticipateintheestablishmentofadynamicwebpagetechnicalstandards.JSPtechnologysomewhatsimilartoASPtechnology,itisinthetraditionalHTMLwebpagedocument(*・htm,*.html)toinserttheJavaprogrammingparagraph(Scriptiet)andJSPtag(tag),thusJSPdocuments(*.jsp).UsingJSPdevelopmentoftheWebapplicationiscrossthatcanrunonLinux,isalsoavailableforotheroperatingsystems.

JSPtechnologytousetheJavaprogramminglanguagepreparedbythecategoryofXMLtagsandscriptlets,toproducedynamicpagespackageprocessinglogic.Pagealsovisitbytagsandsciptletsexistintheservicessideoftheresourcesoflogic.JSPpagelogicandwebpagedesignanddisplayseparation,supportreusablecomponent-baseddesign,Web-basedapplicationdevelopmentisrapidandeasy.

WebserverinthefaceofvisitsJSPpagerequest,thefirstinpiementationoftheproceduresof,andthentogetherwiththeresultsoftheimplementationofJSPdocumentsinHTMLcodewiththereturntothecustomer.InserttheJavaprogrammingoperationofthedatabasecanbereorientedwebsites,inordertoachievetheestablishmentofdynamicpagesneededtofunction.JSPandJavaServlet,isintheimplementationoftheserver,usuallyreturnedtotheclientisanHTMLtext,aslongastheclientbrowserwillbeabletovisit.

JSP1.0specificationofthefinalversionislaunchedinSeptember1999,Decemberhasintroduced1.1specifications.AtpresentrelativelynewisJSP1.2norms,JSP2.0normsofthedrafthasalsobeenintroduced.JSPpagesfromHTMLcodeandJavacodeembeddedinoneoftheconq)onents.

JSscriptlanguagesynopsis

JSisjavascrip,JavascriptisonekindthesciptlanguagewhichcomesbytheNetscapeLiveScrq)tdevelopment,themainpurposeistosolvetheserverterminallanguage,forinstancePerl,carry-overspeedquestion.Atthattimeservedtheendtoneedtocarryontheconfirmationtothedata,becausethenetworkspeedwasquiteslow,onlythen28.8kbps?

theconfirmationstepwaste'stimeweretoomany.ThereforeNetscapebrowserNavigatorhasjoinedJavascipt,hasprovidedthedataconfirmationbasicfunction.

TheJavaScriptofficialnameis"ECMAScript".ThisstandardbyECMAorganizationdevelopmentandmaintenance.ECMA262istheofficialJavaSciptstandard.ThisstandardbasedonJavaScript(Netscape)andJScipt(Microsoft).Netscape(Navigator2.0)BrendanEichhasinventedthislanguage,startedfrom1996,alreadyappearedinallNetscapeandintheMicrosoftbrowser.TheECMA262developmentbeganin1996,in1997July,theECMAgeneralmeetinghasaccq)teditsfirstedition.

Thesciptusesonespecificdescriptivelanguage,restsoncertainformcompilationtobepossibletheexecutiondocument,isalsocalledasgreatorthebatchrundocument.Thesciptusuallymaytransfertemporarilybytheapplicationprocedureandcarryout.Eachkindofsciptpresentwidelyisappliedinthehomepagedesign,becausethesciptnotonlymayreducethehomepagethescaleandraisesthehomepagebrowsingspeed,moreovermayenrichthehomepageperformance,likeanimation,soundandsoon.Citesamostcommonexample,whenweclickinthehomepagetheEmailaddresscantransferOutlookExpressortheFoxmailthiskindofmailsoftwareautomatically,isrealizesthroughthesciptfunction.Alsobecauseofscriptthesecharacteristics,thehumanwhoharborsulteriormotivesbysomeareoftenusing.Forexamplejoinssomedestructioncomputersystem'sorderinthescript,likethisworksastheuserbrowsinghomepage,oncetransfersthiskindofscript,willthencausetheuserthesystemtocomeundertheattack.Thereforetheusershouldactaccordingtovisitshomepagethetrustdegreeselectivesecurityrank,speciallyregardingtheseitselfcontentontheillegalhomepage,donotpermittheusescripteasily.Through"thesafeestablishment95thedialogbox,thechoice"thescript”imderoptioneachkindofestablishmentmaywitheaserealizetosciptbeingforbidandbeginsusing.

JSPandServlets

ThetechnologyofJSPandServletisthemostimportanttechnologywhichuseJava

technologytoexploitrequestofserver,anditisalsothestandardwhichexploitbusinessapplication.Javadevelopersprefertouseitforavarietyofreasons,oneofwhichisalreadyfamiliarwiththeJavalanguageforthedevelopmentofthistechnologyareeasytolearnJavatotheotherisnapreparation,runeverywhere"tobringtheconceptofWebapplications,Toachievea“one-preparedeverywhererealized.nAndmoreimportantly,iffollowedsomeoftheprinc»lesofgooddesign,itcanbesaidofsq)aratingandcontenttocreatehigh-quality,reusable,easytomaintainandmodifytheapplication.Forexanple,ifthedocumentinHTMLembeddedJavacodetoomuch(scipt),willleadthedevelopedapplicationisextremelyconplex,difficulttoread,itisnoteasyreuse,butalsoforfuturemaintenanceandmodificationwillalsocausedifficulties.Infact,CSDNtheJSP/Servletforum,canoftenseesomequestions,thecodeisverylong,canlogicisnotveryclear,alargenumberofHTMLandJavacodemixedtogether.Thisistherandomdevelopmentofthedefects.

EarlydynamicpagesmainlyCGI(CommonGatewayInterface,publicGatewayInterface)technology,youcanusedifferentlanguagesoftheCGIprograms,suehasVB,C/C++orDelphi,andsoon.ThoughthetechnologyofCGIisdevelopedandpowerful,becauseofdifficultiesinprogramming,andlowefficiency,modifycorrplexshortcomings,itisgraduallybeingreplacedbythetrend.Ofallthenewtechnology,JSP/Servletwithmoreefficientandeasytoprogram,morepowerful,moresecureandhasagoodportability,theyhavebeenmanypeoplebelievethatthefutureisthemostdynamicsiteofthefuturedevelopmentoftechnology.

SimilartoCGI,Servletsupportrequest/responsemodelWhenacustomersubmitarequesttotheserver,theserverpresentedtherequestServlet,Servletresponsibleforhandlingrequestsandgeneratearesponse,andthengavetheserver,andthenfromtheserversenttothecustomer.AndtheCGIisdifferent,Servletnotgenerateanewprocess,butwithHTTPServeratthesameprocess.Itthreadsthroughtheuseoftechnology,reducetheservercosts.Servlethandlingoftherequestprocessisthis:

Whenreceivedfromtheclient'srequest,callingservicemethods,themethodofServletarrivalofthefirstjudgementiswhattypeofrequest(GET/POST/HEAD...),thencallstheappropriatetreatment(DoGet/doPost/doHead...)andgeneratearesponse.

Althoughsuchacomplex,infact,simplysaidtoServletisaJavaclass.AndthegeneralcategoryofthedifferenceisthatthistypeoperatinginaServletcontainer,whichcanprovidesessionmanagementandtargetedlifecyclemanagement.SothatwhenyouusetheServlet,youcangetallthebenefitsoftheJavaplatform,includingthesafetyofthemanagement,useJDBCaccessthedatabaseandcrossplatfbrmcapability.Moreover,Servletusingthread,andcandevelopmoreefficientWebapplications.

JSPtechnologyisakeyJ2EEtechnology,itatahigherlevelofabstractionofaServlet.ItallowsconventionalstaticanddynamicHTMLcontentgeneratedbycombininganHTMLpagelookslike,butasaServlettorun.TherearemanycommercialapplicationserversupportJSPtechnology,suchasBEAWd?

Logic,IBMWebSphere,JRun,andsoon.JSPandServletusemorethansingle.IfyouhaveaJSPsupportforWebservers,andaJSPdocument,youcanputitFangdaoanystaticHTMLfilescanbeplaced,donothavetocompile,donothavetopack,donothavetoClassPathsettings,youcanvisitasordinaryWebItdidvisit,theserverwillautomaticallyhe字youtodootherwork.

JSPdocumentlookslikeanordinarystaticHTMLdocument,butinsidecontainsanumberofJavacode.Ituses.Jspthesuffix,usedtotelltheserverthisdocumentinneedofspecialtreatment.WhenwevisitaJSPpage,thedocumentwillfirstbetranslatedintoaJSPengineJavasourcefiles,isactuallyaServlet,andcompiler,andthen,likeotherServlet,fromServletenginetohandle.Servletengineofthistypeloading,handlingrequestsfromcustomers,andtheresultsreturnedtothecustomer.

Afteranothervisitthispagetothecustomer,aslongasthepapertherehavebeennochanges,JSPenginehasbeenloadeddirectlycalltheServletIfyouhavealreadybeenmodified,itwillbeonceagaintheimplementationoftheaboveprocess,translate,conpileandload.Infact,thisistheso-callednfirstpersontopunishment.”Becausewhenthefirstvisittotheimplementationofaseriesoftheaboveprocess,sowillspendsometimeaftersuchavisitwouldnot.

JavaservletsofferapowerfulAPIthatprovidesaccesstoalltheinformationabouttherequest,thesession,andtheapplication,combiningJSPwithservletsletsyouclearlyseparatetheapplicationlogicfromthepresentationoftheapplication;inotherwords,itletsyouusethemostappropriatecomponenttypefortherolesofModel,ViewandController.

Servlets,Filters,andListeners

AservletisaJavaclassthatextendsaserverwithfunctionalityforprocessingarequestandproducingaresponse.IfsimplementedusingtheclassesandinterfacesdefinedbytheServletAPI.TheAPIconsistsoftwopackages:

thejavax.servletpackagecontainsclassesandinterfacesthatareprotocolindependent,whilethejavax.servlet.httppackageprovidesHTTP-specificextensionsandutilityclasses.

Whatmakesaservletaservletisthattheclassimplementsaninterfacenamedjavax.servlet.Servlet,eitherdir

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2