配置了 Shrio框架,session也集成進去了 ,發現問題session會話過期,點擊頁面,一直請求失敗。本來想集成攔截器,過濾器,但是已經用了shiro框架,sessionDestroyed 方法log也打印出來了 ,就是跳轉問題,HttpSessionListener只是對后台數據的整理。
查了資料,有很多就是采用了 全局ajax
$.ajaxSetup({ complete:function(XMLHttpRequest,textStatus){ if(textStatus=="parsererror"){ $.messager.alert('提示信息', "登陸超時!請重新登陸!", 'info',function(){ window.location.href = 'login'; }); } else if(textStatus=="error"){ $.messager.alert('提示信息', "請求超時!請稍后再試!", 'info'); } } })
轉自:
http://www.cnblogs.com/jinxinblogs/p/6114333.html