JDK-6609273 : Plugin2: Unable to load applet dynamically on IE using document.writeln utility
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u5
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • OS: windows
  • CPU: generic
  • Submitted: 2007-09-26
  • Updated: 2010-05-06
  • Resolved: 2008-02-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
Applet is fialing to load dynamically with both the new and old Plug-in using document.writeln utlity on IE. While it works fine on firefox and mozilla with old plug-in but has not been tested with new Plug-in on these browsers. 

try to load following applet

http://sqeweb/deployment2/jitu/deployment_JDK7_int_ws/deployment/src/plugin/manual/html/JSWritelnTest.html
Press any of the displayed button, if applets fail to load then bug is reproduced

Comments
EVALUATION I've downgraded one of my machines to IE 6 and stressed the given test on it. Interestingly, I found that if the test was saved to the local disk, it always failed, even if the "Allow active content to run in files on My Computer" option was selected in the Advanced tab of the Internet Options panel. The test only ever passes when it is loaded from a web server. The test seems to occasionally fail when the Java button (on the applet) is clicked to call document.writeln(). It seems to always pass when the JavaScript button is clicked to initiate this operation. In the situations where the test doesn't pass, in other words, when the document written via document.writeln() contains an applet that isn't loaded, the IE browser never instantiates our ActiveX control. Therefore it's very unlikely that either 6639429 or 6642444 is involved, since those bugs were both related to an applet failing to start when our ActiveX control had been instantiated. It seems more likely that something related to applet shutdown may have changed the behavior. Regardless, the plug-in's code doesn't get called when the test fails. I think this test is simply triggering a race condition in the browser that we somehow seem to have accidentally worked around most of the time. Therefore I don't think this is a bug in the Java Plug-In. The attached testdiv.zip test case from a customer (which has issues, so don't attempt to run it verbatim) shows that it is definitely possible to use document.write() reliably. The issue appears to be that this test case actually overwrites the contents of the current web page from within the Java applet. This doesn't appear to work reliably in IE. Closing this bug again, this time as "Not a Defect". This test needs to be replaced with other tests that dynamically generate the applet tag without completely destroying the contents of the current web page (from within another applet's code).
08-02-2008

EVALUATION ###@###.### has indicated that the problem is still reproducible with IE 6. Re-opening this bug. It is likely that this problem and 6660037 are related. Perhaps this test case can be used as a simpler test to verify any revised fix.
06-02-2008

EVALUATION I apologize for not looking at this bug report earlier. The description in the evaluation that this was happening with both the old and the new plug-in indicated that it wasn't a regression. This problem is no longer reproducible (Windows XP SP2, IE 7, new plug-in). I am not completely sure under what bug ID it was fixed, but believe it was either 6639429 or 6642444. Coincidentally, a new bug, 6660037, was just opened indicating that the fix for 6642444 does not work in all situations. I'm continuing to investigate that but for the time being I'm closing this bug as a duplicate of 6642444.
06-02-2008