Daniel Tahin - 2003-12-16

For some days ago I had the question, how to realize to download the applet f.g: from x.site.com and connect to f.g: other.site.com.
This can be done if you grant permission(s) to the applet, and of course if you specifie the host parameter for the applet in the html-file, like <applet code=...  archive=...><param name="host" value="other.site.com"> and the other parameters...

OK: short description about permissions. (this based on: "http://java.sun.com/docs/books/tutorial/security1.2/index.html" --> "Lesson: Quick Tour of Controlling Applets")

You should use the program policytool, and save all your settings under ".java.policy" (in *nix) or  "java.policy" (in Win) (this is the default user-policy file) in your home directory.  The user policy file is described in "java.home/lib/security/java.security"  where java.home is the path, where you installed JRE.
The policytool is very simple, you must add the correct permission and save it.
Here is my policy file:

-----------------------------BEGIN---------------------------

grant codeBase "http://somewhere.on.the.web/path/to/applet/" {  /*this is location of the applet. You should grant permissions ONLY this applet */
  permission java.security.AllPermission;  /*the applet can do ANYTHING!!!*/
};

------------------------------END----------------------------

Of course without the BEGIN, END:-)