Through java applet I am trying to get socket connection from a client to the server. I encountered “Access denied – SocketPermission”. Please let me know the changes I need to make in the Applet and in the server program.
Thanks,
John
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Applets can connect only to server they were downloaded from. This restriction exists for security reasons.
So, if for example your applet’s
codeattribute ishttp://mycompany.com/myappletyou have to connect to mycompany.com from your applet. Otherwise you will get security exception.If your really need to connect to other place you have to sign your applet.