日期:2014-05-16 浏览次数:20617 次
<session-config>
<session-timeout>1</session-timeout>
</session-config>
function sessionTimeOut() {
function showResult(btn) {
top.location.href = 'login.jsp';
};
check_login = function () {
Ext.Ajax.request({
url: './inc/session.jsp',
success: function (response, options) {
var responseArray = jsonDecode(response.responseText);
if (responseArray.success == false) {
Ext.MessageBox.show({
title: '会话超时',
msg: '您的会话已由于超时而过期,请您重新登录!',
buttons: Ext.MessageBox.OK,
fn: showResult,
icon: Ext.MessageBox.WARNING
});
}
}
});
};
check_login();
setTimeout(showResult, 3000);}
/**
* Session信息查看是否过期
*
*/
public String sessionTimeOut(HttpServletRequest request,HttpServletResponse response){
HttpSession session&nb