freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

20xxjsp技術(shù)外文文獻(xiàn)(編輯修改稿)

2025-01-16 23:10 本頁面
 

【文章內(nèi)容簡介】 theapplicationlogicfromthepresentationoftheapplication。inotherwords,itletsyouusethemostappropriateponenttypefortherolesofModel,ViewandController. Servlets,Filters,andListeners AservletisaJavaclassthatextendsaserverwithfunctionalityforprocessingarequestandproducingaresponse.It'simplementedusingtheclassesandinterfacesdefinedbytheServletAPI.TheAPIconsistsoftwopackages:thepackagecontainsclassesandinterfacesthatareprotocolindependent,whilethepackageprovidesHTTPspecificextensionsandutilityclasses. Whatmakesaservletaservletisthattheclassimplementsaninterfacenamed,eitherdirectlyorbyextendingoneofthesupportclasses.Thisinterfacedefinesthemethodsusedbythewebcontainertomanageandinteractwiththe servlet.AservletforprocessingHTTPrequeststypicallyextendsthe class.ThisclassimplementstheServletinterfaceandprovidesadditionalmethodssuitableforHTTPprocessing. ServletLifecycle Thewebcontainermanagesallaspectsoftheservlet'slifecycle.Itcreatesaninstanceoftheservletclasswhenneeded,passesrequeststotheinstanceforprocessing,andeventuallyremovestheinstance.ForanHttpServlet,thecontainercallsthefollowingmethodsattheappropriatetimesintheservletlifecycle. BesidesthedoGet()anddoPost()methods,therearemethodscorrespondingtotheotherHTTPmethods:doDelete(),doHead(),doOptions(),doPut(),anddoTrace().Typicallyyoudon'timplementthesemethods。theHttpServletclassalreadytakescareofHEAD,OPTIONS,andTRACErequestsinawaythat'ssuitableformostservlets,andtheDELETEandPUTHTTPmethodsarerarelyusedinawebapplication. It'simportanttorealizethatthecontainercreatesonlyoneinstanceofeachservlet.Thismeansthattheservletmustbethreadsafeabletohandlemultiplerequestsatthesametime,eachexecutingasaseparatethreadthroughtheservletcode.Withoutgettinglostindetails,yousatisfythisrequirementwithregardstoinstancevariablesifyoumodifythereferencedobjectsonlyintheinit()anddestroy()methods,andjustreadthemintherequestprocessingmethods. CompilingandInstallingaServlet Topileaservlet,youmustfirstensurethatyouhavetheJARfilecontainingallServletAPIclassesintheCLASSPATHenvironmentvariable.TheJARfileisdistributedwithallwebcontainers.Tomcatincludesitinafilecalled,locatedinthemon/libdirectory.OnaWindowsplatform,youincludetheJARfileintheCLASSPATH. ReadingaRequest OneoftheargumentspassedtothedoGet()anddoPost()methodsisanobjectthatimplementstheHttpServletRequestinterface.Thisinterfacedefinesmethodsthatprovideaccesstoawealthofinformationabouttherequest. GeneratingaResponse Besidestherequestobject,thecontainerpassesanobjectthatimplementstheHttpServletResponseinterfaceasanargumenttothedoGet()anddoPost()methods.Thisinterfacedefinesmethodsforgettingawriterorstreamfortheresponsebody.Italsodefinesmethodsforsettingtheresponsestatuscodeandheaders. UsingFiltersandListeners Theservletspecificationdefinestwoponenttypesbesideservlets:filtersandlisteners.ThesetwotypeswereintroducedintheServletspecification,soifyou'reusingacontainerthatdoesn'tyetsupportthisversionofthespecification,I'mafraidyou're outofluck. Filters Afilterisaponentthatcaninterceptarequesttargetedforaservlet,JSPpage,orstaticpage,aswellastheresponsebeforeit'ssenttotheclient.Thismakesiteasytocentralizetasksthatapplytoallrequests,suchasaccesscontrol,logging,andchargingforthecontentortheservicesofferedbytheapplication.Afilterhasfullaccesstothebodyandheadersoftherequestandresponse,soitcanalsoperformvarioustransformations.Oneexampleispressingtheresponsebodyifthe Acceptlanguagerequestheaderindicatesthattheclientcanhandleapressedresponse. AfiltercanbeappliedtoeitheraspecificservletortoallrequestsmatchingaURLpattern,suchasURLsstartingwiththesamepathelementsorhavingthesameextension. Listeners Listenersallowyourapplicationtoreacttocertainevents.PriortoServlet,youcouldhandleonlysessionattributebindingevents(triggeredwhenanobjectwasaddedorremovedfromasession).Youcoulddothisbylettingtheobjectsavedasasessionattributimplementthe1
點(diǎn)擊復(fù)制文檔內(nèi)容
范文總結(jié)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1