X

Proactive insights, news and tips from Oracle Fusion Middleware Support. Learn Oracle from Oracle.

Oracle Forms Websocket Java Script Integration (WJSI)

Alexandra David
Principal Technical Support Engineer

As a result of changes in the industry, some browser vendors have decided to stop supporting plug-in technologies, including the Java Plug-in. In order to overcome this loss of browser support, Forms 12c delivered two browser-less deployment options (Java Web Start and Forms Standalone Launcher) which are described elsewhere in this document. Because the configurations are browser-less there is no way to communicate with an HTML page running in a browser and thus the standard Forms-Java Script integration does not work in those configurations.

Forms Websocket Java Script integration aims to alleviate this limitation.

Using the Eclipse/Jetty server, a running Forms application can communicate to an HTML page through the Jetty server. The Jetty server is an extremely lightweight application server that has built-in support for Websocket technology and hosts a special intermediate application that assists in the communication between browser and Forms application. This lightweight server is delivered to the user’s machine during application startup.

The implementation of this feature allows for the reuse of most existing Forms Java Script Integration code. To convert an existing application’s Java Script integration do the following:

  • Locate websocketJSI.pll which is provided in the \forms directory and generate it into a PLX.
  • In the Form Builder, open an existing module and open websocketJSI.olb (found in the \forms directory).
  • Copy or subclass the WEBSOCKET JSI group found in the Object Library into the application.
  • Attach websocketJSI.pll to the module.
  • Perform a Find/Replace PL/SQL in the application. Search for web.javascript and replace it with websocketJSI.javascript. Here is an example:

Before:

web.javascript_eval_expr(:block1.JSEXPR);

After:

websocketJSI.javascript_eval_expr(:block1.JSEXPR);

  • Generate a new FMX.

In order for the HTML page to send and receive data, it must include a reference to frmwebsocketjsi.js. This file is provided in the \forms\java directory. This file should not be relocated or altered. In the <HEAD> of the HTML page add the following:

<script type="text/javascript" src="/forms/java/frmwebsocketjsi.js"></script>

Applet parameters associated with this feature are listed in the Applet parameter and Environment Variable tables later in this document.

For more information on how to use this feature refer to the Working with Oracle Forms Guide.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.