【转】 ajax跨域请求时,sessionId不一致问题
解决方案:
js的ajax中,设置
xhrFields:{
withCredentials : true
}
$.ajax({
url: '',
type: 'POST',
xhrFields:{
withCredentials:true
},
data: {
username:userName
},
success: function(respon){
},
error: function(){
}
});