Solved

How to send data from server side to webbrowser without client request?

Posted on 2009-04-02
3
827 Views
Last Modified: 2013-11-24
in web applications, some cases we want to send some data from server side to client side (web browser) needn't the client send request. ButI can't know how to do?.

Example, I develop a web based chat application. in that, I have 2 persons A, B. A send data to B via server side, and then server side send the data to A. Assume that, A connected Server side before.

P/S: By the way, could you show me ideas to build a web based chat instead of.

Thank you so much !
0
Comment
Question by:nminhquy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 26

Expert Comment

by:ksivananth
ID: 24050770
I don't think you can do that unless you have an applet!

if you have applet, then you open a socket conn from applet and do the back/forth communication.

other wise, you need to periodically make javascript to check the server to get any update.
0
 

Author Comment

by:nminhquy
ID: 24051432
Thank you for your reply.
Do you know, how gmail web chat do ?

Gmail web chat is a good example for this. as you know, when our partner types some chars, the web client show : "xxx typing....".

It's not good to use javascript to check periodically.
0
 
LVL 3

Accepted Solution

by:
kingsob earned 500 total points
ID: 24091930
u could use AJAX, and have the client check the server on some fixed interval (how gmail works).. but there is no way for the server to just send data to a client, without the client 1st requesting the information
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
word0 challenge 3 121
eclipse shortcuts 9 76
session migration servlets 2 57
How to retrieve the HTTPServletResponse header field in script tag 1 43
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question