日期:2014-05-16 浏览次数:20718 次
<bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter"> <property name="authenticationEntryPoint"> <bean class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"> <property name="loginFormUrl" value="/login.jsp"/> <property name="forceHttps" value="false"/> </bean> </property> </bean>
Ext.Ajax.on('beforerequest', function(){ Ext.Ajax.extraParams={'ajax_extraParams':'true'}; }, this);//
<bean id="exceptionTranslationFilter" class="org.acegisecurity.ui.ExceptionTranslationFilter"> <property name="authenticationEntryPoint"> <bean class="org.acegisecurity.ui.webapp.AuthenticationProcessingFilterEntryPoint"> <property name="loginFormUrl" value="/checkLogin.jsp"/> <property name="forceHttps" value="false"/> <property name="serverSideRedirect" value="true"/> </bean> </property> </bean>
<% String extraParams=request.getParameter("ajax_extraParams"); System.out.println("extraParams:"+extraParams); if("true".equals(extraParams)){ out.print("{ajax_session_invalid:true}"); return; } String contextPath = request.getContextPath(); response.sendRedirect(contextPath+"/login.jsp"); %>
Ext.Ajax.on('requestcomplete', function(conn,response){ try{ var resp=Ext.decode(response.responseText); if(resp.ajax_session_invalid){ alert("请重新登陆!") location=g_rootPath+"login.jsp"; } }catch(e){ } }, this);