From 79ad48e3630f5afc7b9b66997d63e91412b38d56 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 20 Jul 2007 23:44:31 +0000 Subject: Added documentation on JavaScript-related issues with pulling the JNLPAppletLauncher from a different web server than the applet and containing web page --- .../jdesktop/applet/util/JNLPAppletLauncher.java | 42 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'src/org') diff --git a/src/org/jdesktop/applet/util/JNLPAppletLauncher.java b/src/org/jdesktop/applet/util/JNLPAppletLauncher.java index c1220de..21c3dcb 100644 --- a/src/org/jdesktop/applet/util/JNLPAppletLauncher.java +++ b/src/org/jdesktop/applet/util/JNLPAppletLauncher.java @@ -37,8 +37,8 @@ * intended for use in the design, construction, operation or * maintenance of any nuclear facility. * - * $Revision: 1.15 $ - * $Date: 2007/07/20 23:29:00 $ + * $Revision: 1.16 $ + * $Date: 2007/07/20 23:44:31 $ * $State: Exp $ */ @@ -231,6 +231,13 @@ import org.xml.sax.helpers.DefaultHandler; * *

* + * Note that if you are planning to call into your applet from + * JavaScript that there are some scripting-related caveats that you need to be + * aware of. + * + *

+ * * The jnlpExtension parameters passed to the * JNLPAppletLauncher must be specified with absolute URLs. * @@ -311,7 +318,7 @@ import org.xml.sax.helpers.DefaultHandler; * potentially document the need to try restarting the browser in case * of instability. * - *

Scripting Support

+ *

Scripting Support

* *

* @@ -320,6 +327,35 @@ import org.xml.sax.helpers.DefaultHandler; * JavaScript will return the subordinate applet with which you can * then interact via JavaScript. * + *

+ * + * There are currently some scripting-related caveats associated with + * pulling jar files from multiple locations + * for a particular applet. In particular, it appears that the + * LiveConnect security model on Mac OS X in the Safari browser + * prohibits JavaScript from one domain from communicating with Java + * code (such as an applet) downloaded from another domain. This is + * correct according to older versions of the LiveConnect + * specification, although some more recent implementations of + * LiveConnect allow this, restricting the privileges of such calls in + * other ways. + * + *

+ * + * The workaround for this problem seems to be to host the + * applet-launcher.jar on your web site if you need to + * talk to your applet from JavaScript. Your applet's jars will likely + * also need to be hosted from the same web server. If you talk to + * extension APIs in your archive tag directly from + * JavaScript, you may find it necessary to host those jars on your + * web server as well. + * + *

+ * + * From a practical standpoint, most applet developers using + * JavaScript with the JNLPAppletLauncher will only need to re-host at + * most applet-launcher.jar on their web site. + * *

Examples

* *

-- cgit v1.2.3