Solved

Receiving data via the Browser

Posted on 1998-09-08
7
206 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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

776 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