Solved

Receiving data via the Browser

Posted on 1998-09-08
7
208 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel/Word Add-in in what language? 5 128
Find Visual Studio Tools 2 113
How to convert MFC::CString to UTF8 wchar_t* 10 286
Which Linux flavors will this run on? 6 96
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

831 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