Solved

How does the Web server send data to browser continually?

Posted on 2000-02-21
10
465 Views
Last Modified: 2011-09-20
I need that Web server send data to the browser, which is accessing the same Web server.This web server is a factory site ,It should send real-time data to my browser continually when i browser it. in addition ,the command from my browser can be send to the Web server.

how?
sincerely

david
0
Comment
Question by:davidwee
  • 4
  • 2
  • 2
  • +2
10 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 2542364
Very vague question... what kind of data do you want the server to send to you and do you want it to send to just your browser or any browser that accesses the site.

Then what kind of commands are you sending to the server?

The first thing that comes to mind is server side scripting either using Perl/ASP/Java.

CJ
0
 
LVL 1

Expert Comment

by:snifong
ID: 2543445
..or PHP.
0
 
LVL 3

Expert Comment

by:Alisher_N
ID: 2545531
general approach that you must have some active application on server which process incoming requests or commands and updates/outputs your information. The application maybe written on many platforms and languages, depending on particular situation/your abilities.
On client side in most case you don't need anything but standard browser.
Update can be done manually or automatically in some period. If you need more details please give us more details about your task...
0
 
LVL 2

Accepted Solution

by:
kinross earned 100 total points
ID: 2547112
A web server can not send data to a web browser continuously.  A web browser makes a request for information from a web server.  The web server sends the requested data and processes the next request.  To obtain a "stream" of data there are a couple things you can do.  You can create a client side program that continually requests data from the server.  This can be done with Javascript or other client side client side scripting language.  Another solution would be to create a Java applet embedded in a web page that connects to a Java servlet on the server.  The servelet can then coniually give data to the Java applet to be displayed in the web page.
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 2547356
actually kinross, what you stated is incorrect.  A client side language cannot obtain a stream of data from the server.  Client side scripting executes once... doesn't keep executing and you cannot poll a server to get data using client side scripting.

Server side scripting on the other hand can do this or you can use java applets to do this (like you stated)

Server side scripting can essentially push data to a browser continuously... as can java applets via servlets.

BUT you cannot use client side scripting.

You can use client side applications using java or something.

CJ
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 3

Expert Comment

by:Alisher_N
ID: 2547559
auto update easily can be done using
<META HTTP-EQUIV="Refresh" CONTENT="60">
in HTML code, so client will auto-download the same URL every minute, on server side some application can update this URL contents, so you get your result
0
 

Author Comment

by:davidwee
ID: 2557764
I think that cheekycj'answer is appropriate for me .Because I am working in a SCADA system and a Web camera.So I hope that the Website which is located on remote factory can send data to the linking broswer.In the meantime I can control the factory from my broswer. Webcam is the same .
In the other side ,does the Visua J++ provide these function(servlet program)?
Should the transport protocol between the servlet and the applet be specifed self?
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 2559216
hey.. then why did you give some one else the points???  Just kidding.. I am just glad I could help.

CJ
0
 

Author Comment

by:davidwee
ID: 2564448
cheekycj'POINT += 100;

After I try ,I will run "cheekycj'POINT += 200;" .  OK?

:-)

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 2564822
No prob... good luck in your implementation.. If you have any questions or problems just ask :-)

CJ
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
"In order to have an organized way for empathy mapping, we rely on a psychological model and trying to model it in a simple way, so we will split the board to three section for each persona and a scenario and try to see what those personas would Do,…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now