Solved

Receiving data via the Browser

Posted on 1998-09-08
7
211 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
[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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

617 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