Alternative ways to applet with java web start
In my web application we are using java applet with java web start (jnlp) for showing ticket and printing from client machine using the selected data from web application. If the print is successful, then server gets related notification according to which we take further action. Is there any alternative to it as I want to avoid installing jre in browser and different settings in the client machine? Problem with the existing system is that if a client declines accepting certificate then we are not able to print ticket from the client's printer and we don't get any response. If the user declines accepting the certificate then the server should get notified about it. Any help will be appreciated.
If the user declines accepting the certificate then the server should get notified about it.
Provide a parameter/propety in the JNLP file unique to the customer or that launch. When the app. is set up and on-screen, have it 'phone home' to the server with the unique identifier.
Those clients that don't reply with the unique value either refused the certificate or had the app. crash fatally before appearing on-screen.
The property element & System.getProperty(String)
JNLP property element
The JNLP property element is part of the resources section of the JNLP file.
The property element defines a system property that will be available through the System.getProperty and System.setProperties methods. It has two required attributes: name and value. For example:
<property name="key" value="overwritten"/>
Properties set in the jnlp file will normally be set by Java Web Start after the VM is started but before the application is invoked. ..
See the docs for System.getProperty(String).
public static String getProperty(String key)
Gets the system property indicated by the specified key.