1

I want to manage 2 different session in 2 different tabs of same browser. so I stored data based on logged user id in session storage. i.e like this

  <% int logedId=(int) session.getAttribute("loggedUserId");%>  



 loggeduserID=<%=logedId %> console.log("logged id:",loggeduserID)


console.log("logged id:",loggeduserID)
function poplateOrganizations(callback){
    var selectedOrgId = 0;
    if(sessionStorage.getItem(loggeduserID)!==undefined && sessionStorage.getItem(loggeduserID)!==null){
        organizationPopulation(JSON.parse(sessionStorage.getItem(loggeduse
    }
    else{
    $.ajax({
        type:"GET",
        url:"../getOrg,
        contentType:"application/json",
        success:function(response){

           sessionStorage.setItem(loggeduserID,JSON.stringify(response));

           selectedOrgId=$('#organizationName option:selected').val();
            callback(selectedOrgId.toString());

        }

    });

but now the problem is while logging it is working correct way but if any of the page refreshed it's data is being modified by first cache, I saw here and this and this in last it says spring will support this functionality. does it support now? if yes please can anyone explain me how? or URL rewriting is my only option?

vihang shah
  • 588
  • 1
  • 10
  • 30

0 Answers0