Solved

Receiving data via the Browser

Posted on 1998-09-08
7
201 Views
Last Modified: 2010-04-02

I am interested in receiving data from my HTML page through the Browser, using an applet.
I have a program running on the PC, and I would like the applet send data to it.
Can I do it? Can a C++ program receive data from an applet running in the Browser using regular
inter process communication such as pipes, shared memory or sockets?
Can any one help me? I would like to see an example of the applet and the C++ program.




0
Comment
Question by:shila090498
  • 4
  • 2
7 Comments
 

Expert Comment

by:iliya
ID: 1172237
If you run the applet in a browser (like IE or Netscape) your applet is restricted to send data via tcp/ip only to the address of the server from which the HTML page is loaded. So, if you run your C++ program on the server mashine, you can send data from the applet to the program.
This is only in the mentioned case - applet in a browser. If you make standalone Java application - you can do this in other ways, as well.
I am to busy to write you an example code. Just go to www.mcp.com
After you register in the Bookshelf, you will have access to some books about Java and tcp/ip and they are free.
You will find a LOT of code!

0
 

Expert Comment

by:iliya
ID: 1172238
If you run the applet in a browser (like IE or Netscape) your applet is restricted to send data via tcp/ip only to the address of the server from which the HTML page is loaded. So, if you run your C++ program on the server mashine, you can send data from the applet to the program.
This is only in the mentioned case - applet in a browser. If you make standalone Java application - you can do this in other ways, as well.
I am to busy to write you an example code. Just go to www.mcp.com
After you register in the Bookshelf, you will have access to some books about Java and tcp/ip and they are free.
You will find a LOT of code!

0
 

Author Comment

by:shila090498
ID: 1172239
Hi all,
I would like to have some more details about getting data from the vbrowser.
The server machine and my computer are not the same machine.
My HTML page home base is on one machine, and my C++ application is running on the machine the browser is on.
My C++ program would like to receive data from the HTML page.
The HTML page is written also by me, so I can do in it any thing.
Can an applet make this? Can I use cookies? Can I use Plug-ins?
Is there any other way of doing it?
Thanks  
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Expert Comment

by:iliya
ID: 1172240
Can you run CGI scrips (for example) on the server machine?
If so, you can send the data to your server and after this the server can send it back to your machine to your program.
That is the only way via tcp/ip. I do not think that the cookies and the Plug-ins will help you...
0
 

Author Comment

by:shila090498
ID: 1172241
Hi iliya
Can you send me an example of the CGI to be running in the server?
How do I connect it to the HTML page? Lets say that when the user is pushing a button in the page while in the browser, I want the data to be sent to the server, and the server CGI shall send my C++ application the needed data back ( If I understood, that was your suggestion ).
Please send me an example of this, the HTML page and the server CGI.
Thanks a lot,
Shila
0
 

Accepted Solution

by:
sasidhar earned 100 total points
ID: 1172242
hi shila,

use java sockets in u'r HTML applet and
write program in u'r machine using BSDsockets.
0
 

Expert Comment

by:iliya
ID: 1172243
Hi Shila,
Sorry about my delay. I was so busy last weeks.
Go to www.mcp.com. There are a lot of free books about java programming with a lot of sample code.
Cheers
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

759 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

19 Experts available now in Live!

Get 1:1 Help Now