Neoteric
asked on
Applet/Servlet security
I have a servlet/applet rmi communication example which gives me this messages:
Problem establishing server socket: java.security.AccessContro lException : access denied (java.net.SocketPermission localhost:1313 listen,resolve)
It seems I need to set a security manager somewhere, but I'm having trouble finding out where and how exactly what I need to do to grant the socket permission.
Problem establishing server socket: java.security.AccessContro
It seems I need to set a security manager somewhere, but I'm having trouble finding out where and how exactly what I need to do to grant the socket permission.
ASKER
Ok, thanks. Where should I put this file? Or where do I find it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, I assume both applet and servlet need re-compiling under the new policy before uploading.
Thank you :-)
No, recompilation is not needed. However you will need to restart your server in order for the servlets to be able to use the new policy file. Note that Tomcat might have its own policy file so you might need to change that one as well :-)
No, recompilation is not needed. However you will need to restart your server in order for the servlets to be able to use the new policy file. Note that Tomcat might have its own policy file so you might need to change that one as well :-)
grant {
permission java.net.SocketPermission "loclhost:1313", "listen,resolve";
};