Due to Security Reasons the
Applets can only make a socket connection to the host from where they are loaded.The Client code underneath is an applet which tries to make a socket connection to the host from where it is loaded but the connection could not be established. A SecurityException is thrown.
A Untrusted Appplet can make the connection to the host from where it is loaded. But here in this case it is not able to make the connection what's the reason.
This program is working perfectly fine when the html file is opened in browser on the same machine but, when I open the html file on a remote system the applet is loaded properly but the connection is not established.
If I change the applet to a application then there is no problem but that is not the solution.
Is there any need to use the Security Manager here if yes then what should I do.
Source Code
Client.java
--------------------------------------------------------------
Server.java
---------------------------------------------------------------------------
HTML File
-------------------------------------------------------------------------------------------
< html>
< body>
< applet code="Client" codebase="\\Impactserver\Neeraj\" height=400 width=400>
< /applet>
< /body>
< /html>
Can anyone help.
Neeraj Thakkar
------------------
I added spaces to allow the html to Show and ubb code tags for easier reading
[This message has been edited by Carl Trusiak (edited February 01, 2001).]