Just share the information, hoping that it will be useful for the community.
The usability of applets has decreased as various browsers have stopped supporting plugins. Google decided to stop supporting the NPAPI plugin, EDGE does not support plugins, Firefox is also discouraged by the use of plugins, and Mozilla may follow the package.
One of the applications that we have developed requires the use of applets for the following reasons.
- Ability to access ports and peripherals connected to computing devices
- Ability to exchange information with a web application (via JavaScript)
- Failure by system administrators to install and maintain
- The application should have been launched from a browser
The previously described situation made us consider Java Web Start (JWS) technology as a potential alternative to Applet. However, the JWS came up with its own set of problems due to its inability to communicate with the web application.
The solution (applet) that we had in place will receive a unique identifier from the web application; read data through serial ports; and send the data to the web server along with the previously received unique identifier. Overwriting a stand-alone application was not an option since the user community was as large as the typical B2C user community. Teaching such a large community how to use the app has a lot to do with a lot of effort and staff support. Developing a new application will also require significant efforts in terms of product life cycle.
The JWS adaptation had the advantage of reusing code that was developed for the Applet. However, the ability to exchange information between the Applet and the web application using the Applet-JavaScript bridge is not available with JWS.
So we adapted JWS
The user will have access to the web page referenced by the JNLP file containing the information necessary to run the JWS application
The web application will provide a unique identifier to the JWS application through the JNLP file
At this time, the web application will begin a lengthy polling / reverse AJAX. This was necessary because we had to communicate the results of success / failure using the web application to end users.
After reading information from the serial port, the JWS application will perform an HTTP POST and send readings along with the UID as a parameter
The server will save the results and complete the long polling / callback AJAX; web application notification of operation status
Sridhar
java java-web-start applet
vetal_king
source share