Why is a security exception thrown when using java.net.URL or java.net.URLConnection from an applet?
Web browsers impose security restrictions on applets, which prevent applets from establishing network connections to servers other than that from which they were loaded. Like socket connections, HTTP connections will cause security exceptions to be thrown. If you absolutely, positively, have to access other hosts (and replacing your applet with a Java servlet is impractical), consider using a digitally signed applet.
Related Questions
- I get one or more of the following messages Security Violation. java.lang.verify error, Applet exception:java.lang.ClassFormatError and the chat applet does not load, what do I do?
- Why do I get the following error messages: Security Violation. java.lang.verify error, Applet exception:Java.lang.ClassFormatError?
- Why is a security exception thrown when using java.net.URL or java.net.URLConnection from an applet?