资源描述:
《和jsp技术简介中英文资料外文翻译文献》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Servlet和JSP技术简介中英文资料外文翻译文献AnOverviewofServletandJSPTechnologyMartyHallandLarryBrown,2000-07,CoreServletsandJavaServerPageschapter1!•!AServlet'sJobServletsareJavaprogramsthatrunonWeborapplicationservers,actingasamiddlelayerbetweenrequestscomingfromWebbrow
2、sersorotherHTTPclientsanddatabasesorapplicationsontheHTTPserve匚TheirjobistoperformthefollowingDatabaseLegacyApplicationWebServer(Servlets/JSP)Client(EndUser)tasks,asillustratedinFigure1-1.p►JavaApplicationWebServiceFigure1-11•Readtheexplicitdatasentbythe
3、client.TheendusernormallyentersthisdatainanHTMLformonaWebpage.However,thedatacouldalsocomefromanappletoracustomHTTPclientprogram.2.ReadtheimplicitHTTPrequestdatasentbythebrowse匚Figure1-1showsasinglearrowgoingfromtheclienttotheWebserver(thelayerwhereservl
4、etsandJSPexecute),buttherearereallytwovarietiesofdata:theexplicitdatathattheenduserentersinaformandthebehind-the-scenesHTTPinformation.Bothvarietiesarecritical・TheHTTPinformationincludescookies,informationaboutmediatypesandcompressionschemesthebrowserund
5、erstands,andsoon.3•Generatetheresults.Thisprocessmayrequiretalkingtoadatabase,executinganRMIorEJBcall,invokingaWebservice,orcomputingtheresponsedirectly.Yourrealdatamaybeinarelationaldatabase.Fine.Butyourdatabaseprobablydoesn'tspeakHTTPorreturnresultsinH
6、TML,sotheWebbrowsercan'ttalkdirectlytothedatabase.Evenifitcould,forsecurityreasons,youprobablywouldnotwantitto.Thesameargumentappliestomostotherapplications.YouneedtheWebmiddlelayertoextracttheresultsinsideadocument.4.Sendtheexplicitdata(ie,thedocument)t
7、otheclient.Thisdocumentcanbesentinavarietyofformats,includingtext(HTMLorXML),binary(GIFimages),orevenacompressedformatlikegzipthatislayeredontopofsomeotherunderlyingformat^But,HTMLisbyfarthemostcommonformat,soanimportantservlet/JSPtaskistowraptheresultsi
8、nsideofHTML.5•SendtheimplicitHTTPresponsedata.Figure1-1showsasinglearrowgoingfromtheWebmiddlelayer(theservletorJSPpage)totheclient.But,therearereallytwovarietiesofdatasent:thedocumentitselfandthebehind-the-scenesHTTPinform