Can an applet that uses JavaScript to communicate with a web server migrate to JWS?

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

+2
java java-web-start applet
source share

No one has answered this question yet.

See similar questions:

7
How to interact between browser and Java Web Start applet

or similar:

7
How to interact between browser and Java Web Start applet
3
Migration to Java Web Start - will Applet-Desc be deprecated?
2
Unsigned applets / Java Web Start, Socket Connections?
one
Application to run Java web applications using javascript
one
Java applet interacts with servlet on tomcat server
one
How can I communicate with the serial port in Firefox?
one
Can a Java applet use version v1.7 or 1.8 without warning?
one
How to port a Java applet to Java Web Start
0
There is no error message launching the applet via webstart when the server was not looking
0
Java applet - used to communicate with usb?

All Articles