Reputation: 131
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.
Upvotes: 0
Views: 451
Reputation: 168825
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.
property
element & System.getProperty(String)
property
elementThe 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 theSystem.getProperty
andSystem.setProperties
methods. It has two required attributes:name
andvalue
. 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. ..
System.getProperty
See the docs for System.getProperty(String)
.
public static String getProperty(String key)
Gets the system property indicated by the specified key.
Upvotes: 1