如何将单独的会话与两个不同的弹出窗口关联?
我有一个基于java的网络应用程序。这是我在 Web 应用程序中看到的行为:
我在 customer.jsp 上。我在此 jsp 上提供了两个链接。单击这两个链接时,会打开两个单独的弹出窗口。我现在注意到的是,父屏幕的同一会话与两个弹出窗口相关联。 (当我检查会话 ID 时我知道了这一点 在调试器模式下以及当我对这些弹出窗口进行任何进一步的活动时)。
根据我的要求,我想将不同的会话 ID 关联到两个弹出窗口。我该怎么办?
根据我的理解,这些浏览器应该附加不同的会话 ID,因为会话特定于浏览器。
I have a java based web application. This is the behaviour I am seeing in my web application:
I am on customer.jsp. I have provided two links on this jsp. On click of these two links two separate pop up opens up. What I notice now is that, same session of parent screen is getting associated with both pop up window. (I got know to about this when I inspected the session id
in debugger mode and when I do any further activity on these pop ups).
For my requirement, I want to associate different session ids to both pop up windows. How should I go about this?
As per my understanding different session ids should should be attached with these browsers as session is specific to browser.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Session id 在服务器端生成并与客户端(浏览器)关联。即使在不同的选项卡中,也可以为一个浏览器实例仅保留一个会话。您可以使用不同的浏览器访问相同的 URL 来获得不同的会话,但对于一种浏览器,无论您为同一 URL 打开多少个选项卡,都只会有一个关联的会话。您需要的是在同一会话中处理具有不同标识符的不同弹出窗口。
Session id is generated at the server side and associated with the client(browser). And it is possible to keep only one session for one browser instance, even in different tabs. You can get different sessions with different browsers accessing the same url, but for one browser there will be only one session associated no matter how many tabs you open for the same url. What you will need is to handle the different popups with different identifiers in the same session.