aspose file tools*
The moose likes Distributed Java and the fly likes RMI-Applet Communication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI-Applet Communication" Watch "RMI-Applet Communication" New topic
Author

RMI-Applet Communication

Ashwin Patil
Greenhorn

Joined: May 01, 2001
Posts: 8
I am using frames as the front end to my rmi application. it is working fine. but when i tried it with applets it's giving an error: access denied. What modifications should i do to use applet as front end.
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Did you modify your policy file on the client side, or create a custom one? You have to use a policy that gives the application proper permissions.
This might look like:
grant {
permission java.net.SocketPermission "*:1024-65535", "connect,accept";
permission java.net.SocketPermission "*:80", "connect";
}
Ashwin Desai
Ranch Hand

Joined: Jul 17, 2000
Posts: 124
Hi,
Applets have tighter restrictions than applications. They operate within a security sandbox.
An Applet is allowed to make network connections only to the same machine(same dns/ip) from where it was loaded.
Make sure that the webserver and the RMI server run on the same machine.
Ashwin.
[This message has been edited by Ashwin Desai (edited May 02, 2001).]
Ashwin Patil
Greenhorn

Joined: May 01, 2001
Posts: 8
Ashwin i am running server on my machine itself(localhost) & applet is kept in the same directory as that of rmi server. still it is giving the same error.
Originally posted by Ashwin Desai:
Hi,
Applets have tighter restrictions than applications. They operate within a security sandbox.
An Applet is allowed to make network connections only to the same machine(same dns/ip) from where it was loaded.
Make sure that the webserver and the RMI server run on the same machine.
Ashwin.
[This message has been edited by Ashwin Desai (edited May 02, 2001).]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI-Applet Communication