removing live-connect dependency from web pages containing applets.
I was using jre7u21, for some reason had to move to on update (jre7u45), it has introduced some serious security restriction on applet side, one of the impact is live-connect(javascript to applet) calls. As per documentation here
The idea is that security warning popup appears when there is a javascript to java(applet) call, but there is no issue if applet calls to javascript, so we can safely call from applet to javascript. So my approach is to have one thread per applet which will keep on looking if there is any call from javascript, in javascript we can maintain one method call queue and the applet-thread will keep on polling for any method call in queue, if there is method call then applet-thread will invoke the method on itself through reflection.
I was using jre7u21, for some reason had to move to on update (jre7u45), it has introduced some serious security restriction on applet side, one of the impact is live-connect(javascript to applet) calls. As per documentation here
- The JavaScript to Java (LiveConnect) security dialog prompt is shown once per Applet
classLoader
instance.
- we are fine with older version of jre (older than jre7u45).
- we can afford to our customer giving interface with annoying security warning popup.
- we can configure java security verification (default is "show warning if needed)(control panel -> java -> advance tab)
The idea is that security warning popup appears when there is a javascript to java(applet) call, but there is no issue if applet calls to javascript, so we can safely call from applet to javascript. So my approach is to have one thread per applet which will keep on looking if there is any call from javascript, in javascript we can maintain one method call queue and the applet-thread will keep on polling for any method call in queue, if there is method call then applet-thread will invoke the method on itself through reflection.