Why isn't getSession() returning the same session in subsequent requests distanced in short time periods?

后端 未结 3 1939
萌比男神i
萌比男神i 2021-02-02 16:47

I am sending a $.getJSON (HTTP GET) request twice (with different data), one after another (lets say we have request1 and request2). I can see in the developer tool

3条回答
  •  花落未央
    2021-02-02 17:07

    I noticed that it happens when cookies are disabled in ...web.xml file:

    
    
    
    
        /some-app
    
        
    
        
            
                Keep a copy of the generated servlet class' java code.
            
        
    
        
            
                
                 
            
        
    
    
    

    It should be to retain session ID from the same connection.

提交回复
热议问题