This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI-Applet Communication

 
Ashwin Patil
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6450
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]

 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic