版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
共17页第17-页Intraditionalsupplychaininventorymanagement,ordersaretheonlyinformationfirmsexchange,butinformationtechnologynowallowsfirmstosharedemandandinventorydataquicklyandinexpensively.Westudythevalueofsharingthesedatainamodelwithonesupplier,Nidenticalretailers,andstationarystochasticconsumerdemand.Thereareinventoryholdingcostsandback-orderpenaltycosts.Wecompareatraditionalinformationpolicythatdoesnotusesharedinformationwithafullinformationpolicythatdoesexploitsharedinformation.Inanumericalstudywefindthatsupplychaincostsare2.2%loweronaveragewiththefullinformationpolicythanwiththetraditionalinformationpolicy,andthemaximumdifferenceis12.1%.Wealsodevelopasimulation-basedlowerboundoverallfeasiblepolicies.Thecostdifferencebetweenthetraditionalinformationpolicyandthelowerboundisanupperboundonthevalueofinformationsharing:Inthesamestudy,thatdifferenceis3.4%onaverage,andnomorethan13.8%.Wecontrastthevalueofinformationsharingwithtwootherbenefitsofinformationtechnology,fasterandcheaperorderprocessing,whichleadtoshorterleadtimesandsmallerbatchsizes,respectively.Inoursample,cuttingleadtimesnearlyinhalfreducescostsby21%onaverage,andcuttingbatchesinhalfreducescostsby22%onaverage.Forthesettingswestudy,weconcludethatimplementinginformationtechnologytoaccelerateandsmooththephysicalflowofgoodsthroughasupplychainissignificantlymorevaluablethanusinginformationtechnologytoexpandtheflowofinformation.Inventorymanagementisacommercialenterprisemanagementofthecoreareas,Enterprisescanalsoachieveaneffectivekey,ifwecanachievefromthepurchaseofstock,Salesthentheentireflowofgoodsandcapitalflowsituationfortheunifiedmanagementandreasonableproduction,timelysalesandinventoryisthesmallest.reducethebacklogofmaterial,thenthebusinesswillachievethebestresults.1.sessionInmyexperience,sessionwordisprobablysecondonlytotheextentoftheabuseoftransaction,evenmoreinterestingisthetransactionandthesessioninthecontextofthemeaningofsomeofthesame.
session,theChineseoftentranslatedintothesession,itsoriginalmeaningreferstothebeginningsandendsofaseriesofaction/information,suchasaphonecallfromthedialtopickupthephonetohangupthemiddleoftheprocesscanbedescribedasaseriesofsession.Sometimeswecanseethatthecase"duringthesessioninabrowsersession,...",termusedhereisitsoriginalmeaning,isopenfromabrowserwindowtoclosetheperiodof①.Themostconfusingisthe"user(client)duringthefirstsession,"thewords,itmayrefertoaseriesofuseractions(generallywithaspecificpurposerelatedtoaseriesofactions,suchaslogontobuygoodsfromtosignoutsuchanonlineshoppingcheckoutprocess,sometimesalsocalledatransaction),butsometimesmaybejustthataconnectioncouldalsobethatthemeaningof①,thedifferencecanonlybeinferredbycontext②.
However,whenthetermsessionisassociatedwiththenetworkprotocolwhenitoftenimpliesa"connection-oriented"and/or"onhold"sothetwomeanings,"connection-oriented"referstoboththecommunicationinthecommunicationpriortofirstestablishacommunicationchannel,suchasphonecalls,untiltheotherpartyansweredthephonecommunicationcanbegin,andthisistheoppositeofwriting,beforeyousenttheletter,thetimeyouandcannotconfirmtheothersideoftheaddressiscorrect,communicationchannelsBuyiDingcanbeestablished,butthesender,thecommunicationhasalreadybegun."Keepstate"meansthecommunicationpartyisabletoassociateaseriesofmessages,makingmessagesbetweeneachotherdepends,forexample,awaitercanrecognizeoldcustomerscomebackandrememberthelasttimethecustomerstillowesastore,dollar.Examplesofthistype,"aTCPsession"or"aPOP3session"③.
Andtothewebserverflourishing,sessioninthecontextofsemanticwebdevelopmenthasanewexpansion,itsmeaningismeantotheclientandservertomaintainstatebetweenthesolution④.Sessionisalsosometimesusedtorefertosuchsolutions,storagestructures,such"storedinthesessiontoxxxwhere"⑤.Forvarious用于webdevelopmentlanguagesareavailabletosomeextentonthesupportofsuchasolution,sointhecontextofaparticularlanguage下,sessionalsousedtodenoteasolutiononbehalfofthelanguage,suchasregularJavaintheprovisionofjavax.servlet.http.HttpSessionreferredtoasthesession⑥.
Inviewofthisconfusionhasbeenchanged,inthisarticleusethetermsessionwillhavedifferentmeaningsdependingonthecontext,drewattentiontotheresolution.
Inthisarticle,theuseofChinese"duringthebrowsersession,"toconveythemeaningof①,use"sessionmechanism"toconveythemeaning④,usethe"session"expressionmeaning⑤,usespecific"HttpSession"toconveythemeaning⑥Second,HTTPprotocolandthestatetomaintain
HTTPprotocolitselfisstateless,HTTPprotocolwhichisconsistentwiththeoriginalpurposeoftheclientonlyneedsasimplerequesttodownloadsomefileserver,eithertheclientortheservernothavebeennecessaryrecordsofpastbehaviortoeachother,andeachtimebetweentherequestareindependent,likeacustomerandavendingmachineoranordinary(non-membership)astherelationshipbetweensupermarkets.
However,smart(orgreedy?)Peoplesoondiscoveredthatiftheycanprovideon-demandgenerationofdynamicwebinformationwillbecomemoreuseful,likeacableTVwithon-demandthesamefunction.ThisdemandontheonehandtoforcegraduallyaddHTMLform,script,DOMandotherclient-sidebehavior,ontheotherhandthereistheserver-sideCGIpracticestorespondtoclient-sidedynamicrequest,theHTTPprotocolasthetransportcarrieralsoaddedafileupload,cookiethesecharacteristics.TherolewhichcookieistosolvethestatelessHTTPprotocoleffortsdefects.Asforthesubsequentemergenceofthesessionmechanismisyetanotherinbetweentheclientandtheserverstatesolution.
Letususesomeexamplestodescribethesessioncookieandthedifferencesandsimilaritiesbetweenthemechanisms.Ioncefrequentedacoffeeshopwithfreegiftstodrinkfivecupsofcoffeeoffersacupofcoffee,butaone-timeconsumptionoffivecupsofcoffeeisremote,thenneedawaytorecordacustomer'sconsumption.Imaginethatinfactnothinglessthanthefollowingseveraloptions:
1,thestore'sstaffisverypowerful,abletoremembereachcustomer'sconsumption,aslongascustomersenteredthecafe,shopassistantsknowhowtodealwiththe.Thisapproachistheagreementitselftosupportthestate.
2,issuecustomersacardrecordingthenumberofconsumersingeneralhaveavalidityperiod.Eachconsumer,ifthiscardisproduced,thentheconsumerwillbewiththeconsumerbeforeorafterlinkingup.Thisapproachismaintainedintheclientstate.
3,amembershipcardissuedtocustomers,inadditiontoanyinformationoutsidethecardnumberisnotrecorded,eachconsumer,ifthecardisproduced,thentherecordsclerkinthestoretofindthecardnumbercorrespondstotherecordtoaddsomeconsumerinformation.Thisapproachismaintainedintheserver-sidestate.
AstheHTTPprotocolisstateless,butduetovariousconsiderationsdonotwanttobecomeastate,therefore,thelasttwoprogramshasbecomearealisticoption.Specificallycookiemechanismisusedtomaintainstateoftheclientprogram,whichusesasessionmechanismtomaintainstateintheserver-sideprogram.Wealsoseethat,thankstoserver-sidemaintainstateoftheprogramincustomerclientbutalsoXuyaobaocunalogo,somechanismsmayneedthehelpofsessioncookiemechanismtoidentifythepurposeofDaDaosaved,itactuallyalternativesareavailable.Third,thecookiemechanism
Thebasicprinciplecookiemechanismassimpleastheaboveexample,butthereareseveralissuestoresolve:"membershipcard"howtodistribute;"membershipcard"ofthecontent;andcustomershowtousethe"MemberCard."
OrthodoxcookiedistributionisbyextendingtheHTTPprotocoltoachieve,andtheserverthroughtheHTTPresponseheaderwithalineofspecialinstructionstopromptthebrowserinaccordancewiththeinstructionsgeneratesthecorrespondingcookie.Butpureclient-sidescriptingsuchasJavaScriptorVBScriptcanalsogeneratethecookie.
Thecookieusedbythebrowserinthebackgroundaccordingtocertainprinciplesautomaticallysenttotheserver.Checkallstoredbrowsercookie,ifacookieisgreaterthanorequalscopestatementwillbethelocationoftherequestedresources,puttheresourcesoftheHTTPrequestcookieattachedtotheheadsenttherequesttotheserver.MeansthatMcDonald'smembershipcardcanonlybeproducedintheMcDonald'sstore,ifastorehasalsoissueditsownmembershipcard,thenenterthestorewhentheadditiontoproduceMcDonald'smembershipcard,butalsotoproduceamemberofthestorecard.
cookie'scontentsinclude:name,values,expirationtime,pathanddomain.
Youcanspecifyadomaininwhichadomainsuchas.G,theequivalentofmainstoresigns,suchasProcter&Gamble,youcanalsospecifyaspecificdomainofamachineundersuchor,canfloatFlexibilitytodothan.
PathisthenamebehindtheURLwiththepath,suchas/or/foo,etc.,candomorethanacounterRejoice.
Pathtogetherwiththedomainconstitutesacookie'sscope.
Ifyoudonotsettheexpirationtime,thenthelifetimeofthiscookietothebrowserduringthesession,simplyclosethebrowserwindow,cookiedisappears.Thisperiodoflifeofthecookiebrowsersessioniscalledsessioncookie.Sessioncookieisgenerallynotstoredontheharddiskbutkeptinmemory,ofcourse,providedthatitisnotstandardized.Ifyousettheexpirationtime,thebrowserthecookiewillbesavedtotheharddisk,openagainafterclosingthebrowser,thecookieisstillvaliduntiltheexpirationtimeexceedsaset.
Storedinacookieonyourharddiskinadifferentbrowser,sharedbetweenprocesses,suchasthetwoIEwindows.Andstoredinmemoryforthecookie,differentbrowsershavedifferentapproaches.ForIE,openwindowsinapressCtrl-N(orfromtheFilemenu)toopenthewindowcanbesharedwiththeoriginalwindowwhileusingothermeanstoopentheIEprocesswillnothavetoopenthewindowssharedmemorycookie;forMozillaFirefox0.8,alloftheprocessandcansharethesametabthecookie.Ingeneralisthewindow.openjavascriptwindowwillopenwiththeoriginalwindowssharedmemorycookie.Browser,thiscookieforthesessioncookiedoesnotbelievethatpeopleonlyrecognizetheapproachtotheuseoftheregularsessionofwebapplicationdevelopmentmechanismcausinggreatdistress.
Hereisagoolgesetcookieresponseheaderexample
HTTP/1.1302Found
Location:/intl/zh-CN/
Set-Cookie:PREF=ID=0565f77e132de138:NW=1:TM=1098082649:LM=1098082649:S=KaeaCFPo49RiA_d8;expires=Sun,17-Jan-203819:14:07GMT;path=/;domain=.google.com
Content-Type:text/html
ThisistheuseofHTTPLooktheHTTPSnifferHTTPcommunicationssoftwaretocapturethepartoftherecord
Goolgebrowsertoaccesstheresourcesagain,automaticallysendoutcookie
UseFirefoxcaneasilyobservethecurrentvalueofcookie
UseHTTPLookwithFirefoxcookiecaneasilyunderstandtheworkingprinciple.
IEcanbesettoaskbeforeacceptingcookie
Thisisadialogboxaskingtoacceptcookie.
Fourth,understandthesessionmechanism
mechanismisaserver-sidesessionmechanism,theserverusesahashtableissimilartothestructure(andprobablyistouseahashtable)tosavetheinformation.
Whentheprogramneedsforaclient'srequesttocreateasessionwhentheserverfirstcheckstheclient'srequestisincludedinasessionID-knownasthesessionid,ifthedescriptioncontainsasessionidforthisclientpreviouslyCreateoversession,theserverinaccordancewiththesessionidtoretrievethesessionoutoftheuse(ifnotretrieved,maybethenewone),iftheclientrequestdoesnotincludesessionid,thencreateasessionforthisclientandgenerateasessionwiththisassociatedwiththesessionid,sessionidvalueshouldbeanotonlywillnotrepeat,noteasytofindthelawtocopythestring,thesessionidtobereturnedinthisresponsetotheclientsaved.
Savethesessionidofthewaystousecookie,sotheinteractionofthebrowsercanautomaticallyidentifythisplaybytherulestotheserver.ThenameofthiscookiearegenerallysimilartoSEEESIONID,and.Forexample,webapplicationsweblogicgeneratedcookie,JSESSIONID=ByOK3vjFD75aPnrF7C2HmdnV6QZcEbzWoWiBYEnLerjQ99zWpBng!-145788764,ItsnameisJSESSIONID.
Asthecookiecanbeartificiallyprohibited,theremustbeothermechanismstobebannedinthecookiewhenthesessionidstillbeabletopassbacktotheserver.OftenuseatechniquecalledURLrewriting,thesessionidisattachedtotheURLpathdirectlybehind,therearetwoadditionalways,oneistheURLpathasadditionalinformation,showingtheformofhttp://...../xxx;jsessionid=ByOK3vjFD75aPnrF7C2HmdnV6QZcEbzWoWiBYEnLerjQ99zWpBng!-145788764
TheotherisasaURLquerystringappendedtotheback,showingtheformofhttp:///xxx?jsessionid=ByOK3vjFD75aPnrF7C2HmdnV6QZcEbzWoWiBYEnLerjQ99zWpBng!-145788764
Bothwaysisnodifferentforusers,andonlyaserverparsingthetimetodealwiththedifferentways,usingthefirstwaysareconducivetoturningonekindofsessionid'sinformationandtodistinguishnormalprogramparameters.
WeiLiaoZaitheinteractionalwaysmaintainstate,wemusteachclientmayrequestapathtotherearofcontainingthissessionid.
Anothertechniqueknownashiddenformfields.Isthattheserverwillautomaticallymodifytheform,addahiddenfield,sowhentheformissubmittedtothesessionidpassedbacktotheserver.Example,thefollowingform
<formname="testform"action="/xxx">
<inputtype="text">
</Form>
Beingpassedtoclientwillberewrittenbefore
<formname="testform"action="/xxx">
<inputtype="hidden"name="jsessionid"value="ByOK3vjFD75aPnrF7C2HmdnV6QZcEbzWoWiBYEnLerjQ99zWpBng!-145788764">
<inputtype="text">
</Form>
Applicationofthistechnologyisnowless,IcontactedtheveryoldiPlanet6(SunONEApplicationServer'spredecessor)ontheuseofthistechnology.
InfactthistechnologycansimplyapplytotheactionURLrewritinginstead.
Whentalkingaboutthesessionmechanism,oftenheardofsuchamisunderstanding,"aslongasthebrowserisclosed,sessiondisappears."Infact,imaginetheexamplecard,unlessthecustomertomakesalesonthestorecard,otherwisethestorewouldnoteasilyremovethecustomerinformation.Thisisalsotrueofthesession,unlesstheproceduretoinformtheservertodeleteasession,otherwisetheserverwillremainontheprogramaregenerallydoneintheuserlogoffwhenthesendacommandtodeletethesession.However,thebrowserwillnevertaketheinitiativetonotifytheserverwillbeshutoff,sotheserverwillnothavetheopportunitytoknowthebrowserhasbeenthereasonwhythereissuchamisconception,themajorityofsessionmechanismtouseasessioncookietostorethesessionidandcloseyourbrowserthesessionidisgone,onceagainconnecttotheserverwillnotbeabletofindwhentheoriginalsession.Iftheservercookiesettingsaresavedtotheharddisk,orusesomemeanstorewritethebrowser'sHTTPrequestheadersenttotheoriginalsessionidsenttotheserver,thenre-openthebrowsercanstillfindtheoriginalsession.
Itispreciselybecauseoftheclosuredoesnotcausethebrowsersessionisdeleted,forcingserverseesionsetupafailuretime,asthedistancebetweenthefirstuseoftheclientsessionformorethanthefailuretime,theserverthattheclienthasceaseditsactivities,thesessionwillbedeletedtosavestoragespace.
5,javax.servlet.http.HttpSession
HttpSessionsessionmechanismistheJavaplatformimplementationofnorms,becauseitisonlytheinterface,specifictoeachwebapplicationserverproviders,inadditiontostandardsupport,therewillstillbenorequirementofsomenormsinthenuances.HerewearewithBEA'sWeblogicServer8.1asanexampletodemonstrate.
Firstofall,WeblogicServerprovidesasetofparameterstocontrolitsHttpSessionimplementation,includingtheuseofcookieswitchoptiontouseURLrewritingswitches,sessionpersistencesettings,sessionfailuretimesetting,aswellasforthecookieavarietyofsettings,suchassetcookiename,path,domain,cookiesurvivaltime.
Ingeneral,sessionarestoredinmemory,whentheprocessisstopped,orrestarttheserverwhenthememoryofthesessionwillalsobeempty,ifyousetthesessionpersistencefeature,theserverwillsavethesessiontoyourharddriveWhentheserverprocessrestartortheinformationcanbeusedagain,WeblogicServersupportssustainablemannerincludingdocuments,databases,client-sidecookiepreservationandreproduction.
Strictlyspeakingnotapersistentcopysaved,becausethesessionisactuallystoredinmemory,butthesameinformationisreplicatedtoeachserverprocesswithinthecluster,soevenifaserverprocesstostopworkingandstillavailablefromotherprocessesobtainsession.
cookiesettingswillaffectthesurvivaltimeofthebrowsergeneratesasessioncookieisacookie.Thedefaultistouseasessioncookie.Interestedcanuseittotestusinthefourthquarter,asmentionedinthemisunderstanding.
cookiepathforthewebapplicationisaveryimportantoption,WeblogicServeronthedefaulthandlingofthisoptionmakesitsignificantlydifferentfromotherservers.Wewilldiscussthetopiclater.
Settingsonthesessionreference[5]/wls/docs70/webapp/weblogic_xml.html#1036869
6,HttpSessionFrequentlyAskedQuestions
(Inthissectiontheimplicationsforthesessionmixed⑤and⑥)
1,sessioniscreatedwhen
Acommonmisconceptionisthatthesessioninaclientvisit,wascreated,butthefactisthatuntilaserver-sideprogramcalledHttpServletRequest.getSession(true)whensuchastatementiscreated,notethatiftheJSPdoesnotappeartouse<%@pagesession="false"%>closedsession,theJSPfilewillbeautomaticallycompiledintoaServletwhentheinclusionofsuchastatementHttpSessionsession=HttpServletRequest.getSession(true);ThisisalsoimpliedinJSPsessionobjectorigin.
Asthesessionwillconsumememoryresources,soifyoudonotintendtousethesession,alltheJSPshouldbeturnedoffit.
2,sessionisdeletedwhen
Comprehensivediscussionsearlier,sessionisdeletedinthefollowingcasesa.programcallsHttpSession.invalidate();orb.fromthelasttimebeforetheclientsendsthesessionidthantheintervalsessiontimeoutsettings;orc.serverprocessisstopped(non-persistentsession)
3,howtododeletethebrowserclosedsession
Strictlyspeaking,cannotdothis.Approachcandoalittleeffortisallclientsusethejavascript代码window.oncolosepagetomonitorthebrowser'sclosingmovement,andthensendtotheservertodeleteaQingqiusession.Butthecollapseorforcedtokillthebrowserprocessisstillpowerlesstheseunconventionalmeans.
4,thereishowthematterHttpSessionListener
Youcancreatesuchalistenertomonitorthesessioncreationanddestructionevents,sointheeventofsuchaneventyoucandosomerelevantwork.Notethatsessioncreationanddestructionofactiontriggerlistener,notthereverse.SimilartothelistenerwiththeHttpSessionalsoHttpSessionBindingListener,HttpSessionActivationListenerandHttpSessionAttributeListener.
5,storedinasessionoftheobjectmustbeserializableforyou
Notrequired.Requestedobjectscanbeserializedonlytosessionintheclustercanbecopiedorsavedtoalastingortemporary,wherenecessary,thesessionservercanexchangethememory.ThesessioninWeblogicServercannotbeplacedinaserializedobjectintheconsolewillreceiveawarning.IusedaiPlanetversioniftherecannotbeserializedsessionobjectsinthesessiontherewillbeadestructionofException,verystrange.
6,howtocorrectlydealwiththepossibilityoftheclientagainstcookie
TheURLforallURLrewritingtouse,includinghyperlinks,formofaction,andtheredirectionofURL,thespecificapproach,see[6]
/wls/docs70/webapp/sessions.html#100770
7,opentwobrowserwindowstoaccesstheapplicationwillusethesamesessionoradifferentsession
Seethediscussionofthethirdsectionofthecookie,thesessionidisnotonlytherecognitionofidentification,sodifferentbrowsers,differentmethodsanddifferentwindowsopenthecookieisstoredwillaffecttheanswertothisquestion.
8,howtopreventtheusertoopentwobrowserwindowsoperatingsessionduetoconfusion
Thisissueistopreventmultiplesubmitsofsimilarform,youcansettosolvetheclient'stoken.Isgeneratedeachtimetheserverreturnsadifferentidtotheclient,whilepreservingthesession,theclientsubmitstheformmustalsoreturntheidserver,theprogramfirstcomparesthereturnofidandthevaluestoredinthesessionarethesamein,andifnotthenexplainthisoperationhasbeensubmittedbefore.Cansee"J2EECoreModel"onthepartofthelayermodel.Notethattheuseofjavascriptwindow.opentoopenthewindow,generallydonotsettheid,oruseaseparateid,topreventthemainwindowdoesnotoperate,itisrecommendednottoopenthewindowwindow.openmakechangestooperations,sothatyoucannotset.
9,whychangethesessioninWeblogicServertore-callafterthevalueofasession.setValue
InordertodothisactionismainlyintheclusterenvironmentpromptedWeblogicServersessioninthevaluehaschanged,needtocopytootherserverprocessesthevalueofthenewsession.
10Whyisgonesession
Ruleoutthefailurefactors,thenormalsession,theserveritselfwillbeverylittlepossibility,althoughtheauthorplusanumberofpatchesiniPlanet6SP1Solarisversionhasfaceddown;thepossibilityofbrowserplug-second,Ialsoencountered3721plug-incausedproblems;theoryfirewallorproxyserverincookiehandlingcouldalsobeaproblem.
Mostofthereasonsforthisproblemoccurs,theerrorsarethemostcommonisanapplicationtoaccessanotherapplication.Wediscussthisissueinthenextsection.
7,cross-applicationsharingsession
Oftensuchasituation,alargeprojectdividedintoanumberofsmallprojectdevelopment,inordertobeabletointerferencefromeachother,requiresthateachsmallitemasaseparatewebapplicationdevelopment,buttosuddenlyfindthatlastbetweenafewsmallprojectsneedtosharesomeinformation,orwanttousethesessiontoachieveSSO(singlesignon),storedinthesessionloginuserinformation,themostnaturalrequirementisthatbetweenapplicationscanaccesseachother'ssession.
However,inaccordancewiththeServletSpecification,sessionofthecurrentscopeshouldbelimitedtoapplicationprocedures,betweenthedifferentapplicationscannotaccesseachother'ssessionofeachother.Eachapplicationserver,bothfromthepracticaleffectofcompliancewiththisspecification,butimplementationdetailsmightvary,sotoaddresscross-applicationsessiontosharethemethodsaredifferent.
Firstofall,lookattheTomcatwebapplicationishowtoachieveisolationbetweenthesession,fromTomcattosetthecookiepathofview,itsapplicationindifferentsetcookiepathisdifferent,sodifferentapplicationsusedbythesessionidisdifferent,soeveninthesamebrowserwindowaccessdifferentapplications,senttotheserver'ssessionidcanbedifferent.
Accordingtothisfeature,wecanspeculateTomcatinthesessionmemorystructureasfollows.
I'veusedtheiPlanetalsousedthesameway,itisestimatedbetweenSunONEandiPlanetwillnotbemuchdifference.Fortheserverthisway,theideaisverysimpletosolve,theactualpracticeitisnotdifficult.Orallapplicationssharingasessionid,orlettheapplicationaccesstootherapplicationssessionid.
iPlanetthereisaverysimplewaytoachievesharingasessionid,thatisthepathofeachapplicationofthecookiearesetto/(infactshouldbe/NASApp,fortheapplicationintermsofitsfunctionsastheroot).
<session-info>
<path>/NASApp</path>
</Session-info>
Notethattheoperationofsomesharedsessionshouldfollowtheprogrammingconventions,suchassessionattributenameprecededbytheprefixoftheapplication,makingsetAttribute("name","neo")intosetAttribute("","neo"),toavoidnamespaceconflicts,leadingtooverwriteeachother.
InTomcatthechoiceisnotsoeasy.IntheTomcatversion3,wealsohavesomemeanstosharethesession.Forversion4andaboveTomcat,nowIhavenotyetfoundasimpleway.Withonlythepowerofthirdparties,suchuseoffiles,databases,JMS,orclient-sidecookie,URLparameterorhiddenfieldsandothermeans.
Let'slookathowtohandlesessionWeblogicServeristhe.
FromthescreenshotyoucanseetheWeblogicServerscreenallapplicationstosetthecookiepathis/,thismeanthatthedefaultintheWeblogicServercansharethesessionout?However,evenasmallexperimentcanprovethatdifferentapplicationsusethesamesession,eachapplicationisstillonlyhaveaccesstohisownsetofthoseattributes.ThisshowsthattheWeblogicServerinthefollowingsessionofthememorystructuremay
Forsuchastructure,themechanismitselfinthesessiontoresolvetheproblemsharingsessionshouldbeimpossible.Inadditiontothepowerbymeansofathirdparty,suchasusingfiles,databases,JMS,orclient-sidecookie,URLparameterorhiddenfieldsandothermeans,thereisamoreconvenientapproachistoputaServletContextapplicationsession,sothatAnotherapplicationcanbeobtainedfromtheServletContextreferencetothepreviousapplication.Samplecodeisasfollows,
ApplicationA
context.setAttribute("appA",session);
ApplicationB
contextA=context.getContext("/appA");
HttpSessio
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 建筑装饰装修查验记录表(消防验收)
- 首件检验(FAI)培训|把风险锁死在第一件
- 赣县区大田南山公墓改扩建项目水土保持报告表
- 湖南省益阳市桃江县桃花江灌区续建配套与现代化改造工程环境影响报告书
- 2026盖雅工厂面试题库及答案
- 2026八位员工面试题及答案
- 人工挖孔灌注桩施工安全技术交底
- 《书愤》原文、注释、翻译和赏析
- 第八课 一寸光阴一寸金教学设计小学心理健康南大版六年级-南大版
- §2 复数的四则运算说课稿2025学年高中数学北师大版2011选修1-2-北师大版2006
- 2026四川乐山市犍为县信访局招聘心连心服务人员2人笔试备考题库及答案详解
- 江苏省2026中考作文深度预测专版
- 5.中国的农业(2026-2027高中二年级·中国区域地理专题复习讲义)
- 电力系统运行与调度操作规范指南
- (2025版)AHA心肺复苏与心血管急救指南解读课件
- 《四川省历史建筑修缮技术标准》
- T-CRHA 046-2024 标准手术体位安置技术规范
- 食堂审计专项方案初稿
- 电梯安装维修工-国家职业技能标准(2018年版)(文档完整精排版)
- 侵犯隐私权起诉状范本
- 锅炉二十五项反措及事故预防讲义课件
评论
0/150
提交评论