在IE浏览器中iframe跨域访问cookie/session丢失的解决办法
2013-09-17 23:03
676 查看
单点登录需要在需要进入的子系统B中添加一个类,用于接收A系统传过来的参数;
A系统中点击某个链接,url格式形如:
防止iframe跨域访问cookie/session丢失的解决办法是,在保存session后添加一段代码:即
@Action(value = "outerLogin", results = { @Result(name = "redirect", type = "redirect", location = "${innerUrl}") }) public String outerLogin() { try { if (userName != null && userName.trim().length() > 0) { TPolicemen policemen = policeMenService.getPolicemenByJh(userName); if (policemen != null) { //获取当前登录用户所在IP String ipStr = CommonService.getIpAddr(this.request); policemen.setIpStr(ipStr); this.session.put(AuthInterceptor.USER_SESSION_KEY, policemen); response.setHeader("P3P", "CP=CAO PSA OUR"); innerUrl = outerUrl; return "redirect"; } else { loginStr = "用户名或者密码错误"; } } } catch (Exception e) { this.clientMessage(e.getMessage()); } return "login"; }
A系统中点击某个链接,url格式形如:
防止iframe跨域访问cookie/session丢失的解决办法是,在保存session后添加一段代码:即
response.setHeader("P3P", "CP=CAO PSA OUR");
相关文章推荐
- 在IE浏览器中iframe跨域访问cookie/session丢失的解决办法
- IE浏览器跨域访问iframe 中 Cookie/Session丢失解决方案
- iframe跨域访问session丢失问题解决办法
- iframe跨域cookies和Session丢失问题的解决办法
- 用P3P header解决iframe跨域访问cookie(转) Iframe session失效
- 解决IE浏览器中Iframe跨域访问不能读写cookie问题
- iframe 跨域访问session/cookie丢失问题解决方法
- 关于Iframe如何跨域访问Cookie和Session的解决方法
- 用P3P header解决IE下iframe跨域访问时候session丢失的问题
- 解决同一IP不同端口或跨域访问站点iframe应用session丢失的问与及ASP.NET 开发相关超时设置
- 用P3P header解决iframe跨域访问cookie/session
- 用P3P header解决IE下iframe跨域访问时候session丢失的问题
- 关于Iframe如何跨域访问Cookie和Session的解决方法
- iframe跨域Session丢失问题的解决办法
- 解决IE浏览器中Iframe跨域访问不能读写cookie问题
- iframe 跨域访问session/cookie丢失问题解决方法
- 用P3P header解决IE下iframe跨域访问时候session丢失的问题
- 用P3P header解决iframe跨域访问cookie/session
- 解决访问不同的站点iframe应用session丢失(cookie丢失的问题)的问题
- 用P3P header解决iframe跨域访问cookie/session