有关进销存管理系统中英文翻译_第1页
有关进销存管理系统中英文翻译_第2页
有关进销存管理系统中英文翻译_第3页
有关进销存管理系统中英文翻译_第4页
有关进销存管理系统中英文翻译_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

共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=.

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,gramcallsHttpSession.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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论