• Post Reply Bookmark Topic Watch Topic
  • New Topic

Communicate between two Sessions

 
abinash das
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How Can i communicate between two different sessions?


 
Vijitha Kumara
Bartender
Posts: 3952
21
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sessions are bound with a specific client and managed by the container. What are you trying to do?
 
abinash das
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my application ui have a requirement that

I need to give some information through a form and in that form there is a requirement
to attache some files which will be done on a separate window.

After the files are attached/uploaded i want to get a message on the parent page to proceed ahead.
 
Dhruva Mistry
Ranch Hand
Posts: 67
Eclipse IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abinash das wrote:In my application ui have a requirement that

I need to give some information through a form and in that form there is a requirement
to attache some files which will be done on a separate window.

After the files are attached/uploaded i want to get a message on the parent page to proceed ahead.


use hidden property tags to pass values
 
Ankit Garg
Sheriff
Posts: 9591
34
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abinash by looking at your requirement, you don't need communication between sessions. Both the windows that you are referring, will use the same session. And this is what you have to take benefit of. When the first page opens the second window, the first window will start checking the session on the server to check if the second window's work is done. Lets say that the first windows send ajax requests to a servlet at regular intervals. The servlet which will check if an attribute named 'done' has been set in the session. If it is there than it means then the file upload in the second window is done.

The second window will send the file to a servlet which will save the file on server and set the attribute named 'done' in the session. This way when the file upload is finished, the first window can continue its work...
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pass the values as request parameter from the one to the other webapplication.

Alternatively, if the both webapplications (can) share the same database, you can also just let both access the same database.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!