Deploying WebVue Via Java Web Start (JNLP)
Deploying WebVue Via Java Web Start (JNLP)
(JNLP)
www.pcvuesolutions.com
FRANCE - Paris
ARC Informatique
Head Office
GERMANY - Munich
PcVue GmbH
ITALY - Milan
PcVue Srl
UK - London
Control Technology International
USA - Boston
PcVue Inc
SINGAPORE - Singapore
PcVue Sea
CHINA - Shangai
PcVue China
JAPAN - Nagoya
PcVue Japan
ARC Informatique
ISO 9001 : 2008
ISO 14001 : 2004
certified
ARC Informatique - Head Office address: 2 Avenue de la Cristallerie 92310 SEVRES - FRANCE
Private Limited Company capitalised at 750 000 € - RCS Nanterre B 320 695 356- APE 722 C - SIREN 320 695 356- VAT N° FR 19 320 695 356
Authorization
1 DEFINITIONS ....................................................................................................................................... 5
2 INTRODUCTION .................................................................................................................................. 6
2.1 Compatibility................................................................................................................................... 6
2.1.1 PcVue ............................................................................................................................................. 6
2.1.2 JRE .................................................................................................................................................. 6
2.6 Summary of prerequisites for using WebVue as a Java Web Start application ........................... 16
4 LIMITATIONS .................................................................................................................................... 26
5 FAQ .................................................................................................................................................. 27
6 ADDENDUM...................................................................................................................................... 28
6.1 Alternative syntax for deploying WebVue as a Java Web Start Application ................................ 28
RIA Rich Internet Application. Web application that has similar characteristics
as a traditional desktop application and thus differs from simple web sites
(in particular in term of user interactions).
Java Web Start Technology to deploy Java desktop applications and Java Rich Internet
Applications over network.
JNLP Java Network Launch Protocol. Protocol that allows to load a Java
application from a network location and to execute it locally.
JNLP file Manifest file which includes all the information about how to deploy and
launch a Java Web Start application.
In some cases it can be desirable to deploy the WebVue thin-client as a one-click application
independently of any web browser.
These cases can be due to deployment considerations as well as other pragmatic reasons, for
example the expiring support for Java applets within major web browsers products.
Since major web-browser vendors such as Google and Mozilla have announced discontinued
support for NPAPI-plugins such as the Java Runtime plugin the number of cases in which a
web-browser independent deployment of the WebVue thin-client is needed is rapidly growing.
The Java Web Start technology allows distribution of Java applications and Java applets such
as WebVue as a downloadable one-click-application with no further installation procedure
required. Both is achieved by using the Java Network Launching Protocol (JNLP).
This document describes how to set up the environment for deploying the WebVue applet as a
Java Web Start component via JNLP.
2.1 Compatibility
2.1.1 PcVue
The compatibility of WebVue with Java Web Start has been tested with the following versions.
Notes:
For other versions of PcVue please contact your local technical support agency.
All version above are also Web Start enabled. The feature is documented in the official product
documentation starting with PcVue 11.2.
2.1.2 JRE
All JRE versions supported by the respective PcVue version.
2. Go to the WEB-directory of your PcVue project and create the webvue.jnlp-file. You
take the example below but you will have to modify it according to your needs (see
chapter 2.5.2 for details).
3. On IIS set the MIME type for the JNLP-file extensions (see chapter 2.5.3 for details).
4. Sign the WebVue applet with a certificate that is issued by a trusted authority (see
KB618 for details).
This file needs to be put in the WEB folder of your PcVue project, for example:
The JNLP file configuration is put together in XML format. Please find the full description of the
syntax here:
https://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/jnlpFileSyntax.html
Or here:
http://lopica.sourceforge.net/ref.html
We recommend to name the file webvue.jnlp. But it also can have any other name, as long as
the file extension remains .jnlp.
Note:
Java Web Start can launch both Java applications and Java applets via JNLP. Since WebVue is
designed as a Java Applet, the JNLP file shall be configured to deploy WebVue as an applet,
which requires to use the “applet-desc” directive and not the “application-desc”.
See here a general example of a JNLP file with placeholders and find a real-life example below.
<information>
<title>WebVue</title>
<vendor>Arc Informatique</vendor>
</information>
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="AiWebVue-signed.jar" main="true" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc
documentBase="https://[hostname]:[port]/[PcVueProject]/"
name="WebVue"
main-class="svfc.launcher.WebVueClient"
width="1680"
height="1050" />
</jnlp>
Example:
Notes:
(1) Java Web Start prevents usage of unsigned applets. For PcVue 11.0 and later a self-
signed version of the WebVue applet is available, called AiWebVue-signed.jar. Please
note that self-signed certificates do not guarantee a high level of security and shall only
be used for test purpose, but not in production environments. It is highly recommended
to sign the unsigned version of the WebVue applet, called AiWebVue.jar through a
certificate authority.
(2) If you are using PcVue 10.0 or earlier you need to take into account that in these
versions WebVue consisted of not only one jar-file, but of four.
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="AiWebVue.jar" main="true" />
<jar href="AiTools.jar" />
Title: Deploying WebVue via Java Web Start (JNLP)
Reference: <Ref to be updated>
Last modification: 14 April 2016 Page 9/30
<jar href="AiTrend.jar" />
<jar href="AiAlarmList.jar" />
<jar href="AiLogList.jar" />
</resources>
In the Windows Internet Information Services (IIS) Manager navigate to your WebVue web
application and double click on MIME Types in the right pane.
Extension: .jnlp
MIME Type: application/x-java-jnlp-file
Now you are able to download the JNLP file from the following URL. The local Java Runtime
Environment on the client system will recognize the file extension, parse the JNLP-file and
launch WebVue according to the information provided in the file.
https://[hostname]:[port]/[PcVueProject]/webvue.jnlp
As a workaround it is also possible to whitelist the applet’s origin on client-side. This can be
achieved by a Java Deployment Ruleset
(https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/deployment_rules.htm
l) or by manually adding the WebVue host to the whitelist in the Java control panel on client-
side:
Open the “Java Cache Viewer” by selecting “View” in the section “Temporary Internet
Files” of the tab “General “:
The following icon will appear on your desktop and allow you to conveniently launch WebVue.
Client side:
In order to enable automatic updates you must set the “href”-attribute in the “jnlp”-node of
the JNLP file. It needs to declare the location of the JNLP file on the server so that Java Web
Start on the client knows from where to get it after initial download.
Now the Java Web Start engine will check the server-side JNLP file for updates each time
before launching the WebVue application.
Note:
It is highly recommended to enable automatic updates! The benefit of that is that after
installing a new PcVue version on the server-side all WebVue clients will be updated
automatically.
By default, the Java Runtime Environment also updates itself automatically by retrieving its
latest update version from the Oracle servers. This functionality is independent of JNLP
automatic updates.
Now you are able to access WebVue as a Java Web Start application by navigating to the
following URL:
https://[hostname]:[port]/[PcVueProject]
If you did the configuration as described above, you can start the application by entering the
same URL you would use for WebVue embedded in your web browser.
Note:
Do not use this simplification when you have a heterogeneous mix of users which are using
WebVue in the browser context and users which are using WebVue as a Java Web Start
application in parallel. This setting will override the index.html as default document.
Also this option is not compatible with embedding the JNLP file in your index.html (see below).
<information>
<title>WebDemo_en</title>
<vendor>Arc Informatique</vendor>
</information>
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="AiWebVue-signed.jar" main="true" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc
documentBase="https://[hostname]:[port]/[PcVueProject]/"
name="WebVue"
main-class="svfc.launcher.WebVueClient"
width="1680"
height="1050" />
<update check="background"/>
</jnlp>
As a result multiple projects will get easier to manage from the Java Cache Viewer:
Obviously this option is not available when launching WebVue outside of the web browser
context.
When launching WebVue as a Java Web Start applet the following syntax can be used in the
JNLP file:
The benefit of that is that you can still take advantage of the Java Deployment Toolkit which
has been used for the WebVue applet deployment since PcVue 11.0, and also that minimum
effort is required to only change the existing index.html file appropriately.
In particular, you will need to embed the link to the JNLP file in your own web page so that
WebVue can be included in a custom web portal.
Title: Deploying WebVue via Java Web Start (JNLP)
Reference: <Ref to be updated>
Last modification: 14 April 2016 Page 20/30
The Java Deployment Toolkit which is used to deploy WebVue since PcVue 11.0 can be easily
advised to directly download a JNLP file from a specific server address or to render a button on
the index.html file that allows users to download the JNLP file from the server and
consequently the WebVue application.
deployJava.launch('webvue.jnlp');
In order to do so insert the following code into your web page and comment the rest of the
content inside the <SCRIPT>-tag:
deployJava.createWebStartLaunchButton('webvue.jnlp', '1.6.0');
Note:
Please note that you cannot set dynamic parameters for the WebVue applet in the way it was
possible when executing the WebVue applet in a web browser context.
4.3 Security
HTTP and HTTPS are both supported. For the configuration of SSL/TLS encryption please refer
to the PcVue documentation (PcVue 11.1) or the Knowledge Base (for earlier versions).
The only workaround for that would be to generate the JNLP file dynamically on the server side
according to parameters that are passed from the client, for example as URI arguments.
However, a description of how to achieve that is out of the scope of this article.
<information>
<title>WebVue</title>
<vendor>Arc Informatique</vendor>
</information>
<resources>
<j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="AiWebVue-signed.jar" main="true" />
</resources>
<security>
<all-permissions/>
</security>
<update check="background"/>
</jnlp>
Example:
Parameters
In theory, when launching WebVue as a Java Web Start application the parameters can be
passed through the JNLP file:
Currently passing parameters from the JNLP file into WebVue when launching WebVue as a
Java Web Start application does not seem to work. The reason for that needs to be evaluated
and the issue corrected. An SPR has been generated for that purpose: #61365.
SCADA Basic
The following verbs are not supported when launched as Java Web Start application:
- CONNECTURL
- LIST