Solved

How does the Web server send data to browser continually?

Posted on 2000-02-21
10
472 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Read about why website design really matters in today's demanding market.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

777 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