This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Applets and the fly likes java. security. AccessControlException: Access Denied (java. net. SocketPermission.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "java. security. AccessControlException: Access Denied (java. net. SocketPermission.." Watch "java. security. AccessControlException: Access Denied (java. net. SocketPermission.." New topic
Author

java. security. AccessControlException: Access Denied (java. net. SocketPermission..

Ramesh Babu Duggudurti
Greenhorn

Joined: Nov 11, 2003
Posts: 2
Dear All,
I have webserver on which my JSPs run and a separate server(on different machine) written in Java socket programming. when i am trying to run the client in my browser(like http://webserver/client.jsp client files on the webserver) i am getting java.security.AccessControlException: Access Denied (java.net.SocketPermission Server:3456 connect,resolve)
If i have the socket server on the same machine as the webserver or if i edit the java.policy file to include socket permissions on the machine from which iam browsing iam not getting this error.
Can anyone explain me how to overcome this problem without modifying the policy file on the clients system.
Ramesh Babu
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

You don't say this, but I'm guessing the "client" is an applet; otherwise the policy files on the client wouldn't matter. Applets are specifically prohibited from making network connections from machines other than the host they were downloaded from. The only way around this is by using a digital signature in the applet; here's some information about that.
I'm moving this to the Applets forum; followups over thers.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java. security. AccessControlException: Access Denied (java. net. SocketPermission..