Blog

How to prevent warning dialogs using NetCharts Applets

Recent browser updates are changing the way unsigned Java applets are run. The default security level for Java applets has been increased from “Medium” to “High”. With the “High” setting the user is always warned before any unsigned application is run, and may not allow unsigned applications to run at all to prevent silent exploitation. […]

Author:
Date:
October 2, 2015
Category:
Developer Products, NetCharts Pro

Recent browser updates are changing the way unsigned Java applets are run. The default security level for Java applets has been increased from “Medium” to “High”. With the “High” setting the user is always warned before any unsigned application is run, and may not allow unsigned applications to run at all to prevent silent exploitation.

A signed version of the NetCharts Pro core library, ncp-core.jar, used to serve NetCharts Pro charts in applets mode is available within the /applets folder of the NetCharts Pro distribution. Using the signed JAR file and running your applets in sandbox mode, it is possible to run NetCharts Applets and meet security requirements, limiting warnings to a single informational dialog when the first NetCharts chart is presented.

How to use the signed ncp-core.jar file

To run NetCharts Applets in sandbox mode, include a permissions element inside the applet element like:

<param name="permissions" value="sandbox"/>

The result looks like this:

<applet id="netchart" codebase="../lib" archive="ncp-core.jar" code="netcharts.apps.NFBarchartApp" width="450" height="300">
<param name="permissions" value="sandbox"/> 
<param name="NFParamScript" value='CDL PARAMETERS...'/>
</applet>

Code Changes for Users Upgrading from Older Versions

For users of older versions you may need to update the archive attribute of your applet tags to point to ncp-core.jar. For example, change archive=”netcharts.jar” to archive=”ncp-core.jar”.
NOTE: If you have applet tags in many pages, and changing the code is too onerous, make a copy of the ncp-core.jar file and change the name of the copied file to the name currently referenced in your applets tags, removing the need to update your code for now.

Also check the code attribute of your applet tags. If you are including the version number in the package (e.g. netcharts5.apps.NFBarchartApp), remove the version number. For example, you must change netcharts5.apps.NFBarchartApp to netcharts.apps.NFBarchartApp.

Also see related blog posts:
How to prevent security warnings using NetCharts Applets and remote connections (Coming soon)

If you have any questions, feel free to contact us at support@visualmining.com.

Comments are closed.