The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Re: SecurityException in Applet

Posted by Brian Sanders on November 20, 2001 at 4:53 PM

From your exception, it looks like you have the applet hardcoded to try and load the web server on the local machine. An applet may only open connections to the server from which it was loaded.

A good method for getting the server name would be to call getCodeBase() within the applet. This will give you the URL of the applet, from which you can determine the appropriate URL for the web server.



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us