· Sep 26, 2017

CSP: Print All PDF Reports, Java Applet not Supported Anymore, How to Migrate to Java Web Start (JNLP)

Hi all-

We used to have this Java applet in our CSP page to "print all" and "download all" PDF medical reports.  We want this applet so that the user won't have to open each PDF in the browser just to print it.

But now most browsers do not support Java applets anymore due to security concerns, so that Java application is down.  We tried to migrate to Java Web Start but don't know how to invoke the JNLP file from the CSP page.  I am new to Cache so any help would be greatly appreciated.

Also, is there an easier solution to this print all problem?  I assume many hospitals/labs would be facing the same issue, so there might be a smart hack?

Discussion (6)1
Log in or sign up to continue

Embedding a JLNP file in a CSP page is the same as in a plain HTML page. You have to embed and load the JLNP file using something like the following snippet:

<script src=""></script>
    var attributes = {} ;
    <!-- Base64 encoded string truncated below for readability -->
    var parameters = {jnlp_href: 'your_applet.jnlp',
        jnlp_embedded: 'PCEtLSANCi8qDQogKiBDb ... bmxwPg=='
    } ;
    deployJava.runApplet(attributes, parameters, '1.8');

In order to figure out the value for the jnlp_embedded parameter you have to base64 encode the contents of your JNLP file. The JNLP file has to be accessible from the relative link provided by the parameter jnlp_href.

This tutorial explains how to embed JNLP files: