不同浏览器窗口中的JSF会话问题 [英] JSF Session issue in different browser windows

查看:99
本文介绍了不同浏览器窗口中的JSF会话问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个基于JSF 2.0(MyFaces)构建并在Weblogic应用服务器上运行的应用程序.我们面临有关http会话的问题.

We have an application which is built on JSF 2.0(MyFaces) and runs on Weblogic app server. We are facing an issue regarding http Session.

问题::假设我已经在两个不同的IE窗口中打开了该应用程序,并在第一个窗口中提供了一些搜索输入.在第二个窗口的会话中共享在第一个窗口中接收到的搜索结果数据.

Issue: Suppose I have opened the app in two different IE windows and give some search input in first window. The search result data received in first window is being shared in second window's session.

注意:. Bean的作用域为sessionjavax.faces.STATE_SAVING_METHODserver.共享static变量没有问题.

Note: . The beans are session scoped and javax.faces.STATE_SAVING_METHOD is server. There's no problem of static variable being shared.

任何想法为什么会发生这种情况,以及防止这种情况发生的解决方案?

Any idea why is this happening, and a solution to prevent this if any ?

关于, 沙吉.

推荐答案

这是因为IE将会话ID JSESSIONID保留在cookie中.该cookie存在于同一IE空间"中.您将意识到,如果您使用IE和Firefox,则不会共享会话cookie.

That's because IE keeps the session ID JSESSIONID in a cookie. That cookie exists in the same IE "space". You will realise that if you use IE and Firefox, the session cookie isn't shared.

JSESSIONID本质上是Web容器用于会话跟踪的标识符.如果浏览器不支持cookie,则将ID附加在URL上.就您而言,您将JESSIONID存储在cookie中,并且所有多个窗口都可以看到相同的Session cookie.

JSESSIONID is essentially the identifier used for Session Tracking by your web container. If the browser doesn't support cookie, the ID is appended on the URL. In your case, you have JESSIONID stored in a cookie and all your multiple windows can see the same Session cookie.

这篇关于不同浏览器窗口中的JSF会话问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆