系统后台的页面是用iframe框架整的,session超时后,退出不会退出整个框架,会在框架的右边显示,很郁闷,我用的是struts2

解决方案 »

  1.   

    session过期后跳转到登录页面不行吗?
      

  2.   

    跳转到登陆页面,,页面会在frame框架的右边显示啊。 不会单独在一个页面
      

  3.   

    在index.jsp界面加段js
    if (top.location != self.location){   
    top.location=self.location;   

    此段js在body的onload方法里面初始化。
      

  4.   

    假如你的框架页面为iframe.jsp这个页面有,有上,左,右三个页面,当你点击top.jsp页面里的按钮时:
    你只需要在   $("#exit").click(function(){
         top.location.href="admin_logout.action";//让顶级窗口跳转,其先用action移除session中的值
        });
    action 片段:
    public String logout() throws Exception {
         getRequest().getSession().removeAttribute("ManangeAuthentication");
        return "ManageEntry"; //ManageEntry登陆页面