问题
I have implemented session handling in Flex Java application, But I am facing one issue in that.
When I login after that I am creating new flex session by :
session = FlexContext.getFlexSession();
But If I test my application in two different browser then :
• IE browser : If I login my application then its giving me some session ID like (0704943129C2D91539D989EA1DB70D37).
• Mozilla browser : If I login to my application at same time then its giving me a different Session ID : (9073B8D787A7CDF0885A646B4BB8DBCC)
But in my application if I refresh browser then it should return to same page so I write a code :
public String getCurrentState(){
System.out.println(session.getId());
return (String)session.getAttribute("currentState");
}
This method will give me current State of page so I can redirect to same page when I refresh my page.
when I run application in 2 different browser But in this method functionality of method will change automatically like:
IE Browser: if I am on ABC page and if I refresh browser it should go to same page like ABC same flow with Mozilla Browser.
But when I refresh my application in Mozilla then if IE having ABC and Mozilla showing XYZ then sometime it execute different like IE shows XYZ and Mozilla shows ABC.
I am confuse with this functionality.
Please kindly do needful help.
Thanks a lot for your HELP.
Logs:
PFA Below Logs For My Application :
IF I Login to IE Browser :
BBC5491525B53AD5473BFFF5DE811324 loginId before : admin0.09284337847701252 inside add Session :Id admin0.09284337847701252 sessionId BBC5491525B53AD5473BFFF5DE811324 loginType admin loginId after : admin0.09284337847701252 status Written to Sessio
IF I login to Mozilla Browser :
B908B8B0F4E02D99A47DC4E276AC803B loginId before : admin0.8330401328813781 inside add Session :Id admin0.8330401328813781 sessionId B908B8B0F4E02D99A47DC4E276AC803B loginType admin loginId after : admin0.8330401328813781 status Written to Session
IF I refresh Mozilla Browser :
BBC5491525B53AD5473BFFF5DE811324
IF I refresh IE Browser :
B908B8B0F4E02D99A47DC4E276AC803B
来源:https://stackoverflow.com/questions/22196787/flex-session-handling-with-java