Multi Windowing in a Java Web Project

I have an EJB 2.1 project (actually it should be ported to EJB 3.1 :-))
Currently, it only supports one window. this means that the user must work on the window. This is because of the variables used as session variables. (Recent search criteria, last used identifier, etc.).

I want to open two or more tabs, for example, Firefox and work in parallel. If the user is on the same tab, variables should be stored only for this tab. For all tabs, only global variables are allowed.
How can I approach this problem? Any documentation for understanding multiwindow will also be helpful.
Any other idea or experience working with a multi-window web project is also welcome.

+4
source share
1 answer

There is no built-in way to deal with this in browsers or in any EJB that I know of. Other web application frameworks have the concept of web streams, which are a series of connected actions that can handle multiple streams on different tabs of the same browsers, so you can start looking there.

In short, they create their own cookies, which are controlled by the application, not the browser itself. These application cookies are then used to store pieces of information related to the current set of operations, like a session.

Such things are often caused by users who click on a link that opens in a "new window" (or tab) that notifies the application (via a page hit or ajax call) that a new "work session" is opened and gets the internal session setting.

+1
source

Source: https://habr.com/ru/post/1399383/


All Articles