版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
共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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026北京大学大数据分析与应用技术国家工程实验室招聘劳动合同制人员3人考试参考试题及答案解析
- 2026河南新乡长垣烹饪职业技术学院教师招聘3人考试备考试题及答案解析
- 2026四川成都国际铁路港投资发展有限公司社会招聘工作人员2人考试参考试题及答案解析
- 2026广东广州市中学生劳动技术学校办公室编外职员招聘1人考试参考题库及答案解析
- 2026福建厦门自贸片区港务电力有限公司机线员岗社会招聘1人考试备考题库及答案解析
- 2026湖南衡阳市石鼓区城市建设投资有限公司招聘6人考试备考题库及答案解析
- 2026冶金工业经济发展研究中心招聘3人考试参考试题及答案解析
- 2026广西正远电力工程建设监理有限责任公司第一批项目制用工招聘24人考试备考题库及答案解析
- 2026广东云浮市罗定市泷博工程咨询有限公司招聘1人考试备考题库及答案解析
- 2026广东深圳龙岗区平湖街道融湖世纪幼儿园招聘1人考试参考题库及答案解析
- 绿电绿证交易培训课件
- 国网企业文化
- 增值税发票台账管理表(进项+销项)
- 2026年中考道德与法治模拟考试卷(含答案)
- ICD起搏器术后护理
- 2025年广东省东莞市东华初级中学中考数学三模试卷
- 金山区2024-2025学年下学期期末考试六年级数学试卷及答案(上海新教材沪教版)
- 中医护理在疼痛中的应用
- 杭州萧山拆迁协议书
- JJF 2220-2025导热系数稳态测定仪校准规范
- 铁塔巡检考核管理制度
评论
0/150
提交评论