aspose file tools
The moose likes JSP and the fly likes Communicate between two Sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Communicate between two Sessions" Watch "Communicate between two Sessions" New topic
Author

Communicate between two Sessions

abinash das
Ranch Hand

Joined: Apr 26, 2008
Posts: 52

How Can i communicate between two different sessions?


Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3670

Sessions are bound with a specific client and managed by the container. What are you trying to do?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
abinash das
Ranch Hand

Joined: Apr 26, 2008
Posts: 52
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

Joined: Nov 21, 2008
Posts: 66

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


Dhruva
Ankit Garg
Saloon Keeper

Joined: Aug 03, 2008
Posts: 9189
    
    2

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...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Communicate between two Sessions
 
Similar Threads
communicating between two web application
When to use Serializable
Need Coding
To write a chattting programme
communicate between 2 war files