简体   繁体   English

如何将单独的会话与两个不同的弹出窗口关联?

[英]how to associate separate session with two different pop-up windows?

I have a java based web application. 我有一个基于Java的Web应用程序。 This is the behaviour I am seeing in my web application: 这是我在Web应用程序中看到的行为:

I am on customer.jsp. 我在customer.jsp上。 I have provided two links on this jsp. 我在此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). (当我在调试器模式下检查会话ID以及对这些弹出窗口进行任何进一步的活动时,我都知道这一点。)

For my requirement, I want to associate different session ids to both pop up windows. 根据我的要求,我想将不同的会话ID关联到两个弹出窗口。 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. 据我了解,这些会话应随浏览器附加不同的会话ID,因为会话特定于浏览器。

Session id is generated at the server side and associated with the client(browser). 会话ID在服务器端生成,并与客户端(浏览器)相关联。 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. 您可以使用不同的浏览器访问相同的URL来获得不同的会话,但是对于一个浏览器,无论为同一URL打开多少个选项卡,都只会关联一个会话。 What you will need is to handle the different popups with different identifiers in the same session. 您将需要在同一会话中使用不同的标识符处理不同的弹出窗口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM