-- Connecting to remote server through sockets --

Hi Friends,

I have developed a java application. When I directly run the application from the command prompt, it gets connected to the remote server through sockets.

But when I embed this application into html file, then I am unable to connect to the remote server.

Can anyone of tell me why is it so? Also I shall be happy to know the appropriate solution.

Thanks.

[399 byte] By [Syed_Mudassira] at [2007-11-27 1:55:31]
# 1
That's because you can't embed a Java application into an HTML file. At least, not in a way that executes the application.
DrClapa at 2007-7-12 1:28:34 > top of Java-index,Java Essentials,Java Programming...
# 2
I did not get what you said.I mean I created a html file. In that file, I attached the application class file as an applet. Now when I run it, it won't get connected to the server.
Syed_Mudassira at 2007-7-12 1:28:34 > top of Java-index,Java Essentials,Java Programming...
# 3
An unsigned applet can only connect to the server it was loaded from.
ejpa at 2007-7-12 1:28:34 > top of Java-index,Java Essentials,Java Programming...
# 4

> I did not get what you said.

> I mean I created a html file. In that file, I

> attached the application class file as an applet.

> Now when I run it, it won't get connected to the

> server.

Only applets can be run in web browser.

The unsigned applet can only make socket connection to the machine or web server where from it was loaded(hosted).

The signed applet can connect (make socket connection) with the machine other than it was loaded from. So you have to sign your applet as the previous member said in his reply.

jawadhashmia at 2007-7-12 1:28:34 > top of Java-index,Java Essentials,Java Programming...