What is Programmable Host On-Demand The Programmable Host On-Demand API is a set of Java APIs that allow developers to integrate various pieces of the Host On-Demand client code, such as terminals, menus, and toolbars, into their own custom Java applications and applets. Advantages of using Programmable Host On-Demand
In this blog, focus remains on custom applets. What is Java Web start technology Applets are typically downloaded from a Web server and run on a client machine in a Web browser that has Java support i.e users need to enable Java plugin support in their browser via NPAPI plugins. Most browsers stopped supporting NPAPI plugins except Microsoft Internet explorer because plugins are a source of performance problems, security incidents and crashes. Note: Microsoft has also released their own plugin free web browser Edge. The way forward for existing applet based applications is to use Java web-start technology as suggested by Oracle. Java Web Start (also known as JavaWS, javaws or JAWS or JNLP) is a framework developed by Sun Microsystems (now Oracle) that allows users to start application software for the Java Platform directly from the Internet using a web browser. Some key benefits of this technology include seamless version updating for globally distributed applications and greater control of memory allocation to the Java virtual machine. Putting these together in IBM Host On-Demand IBM Host On-Demand web start client can wrap applets into an application. Users need to implement LoadableAppletInterface and WSLoadableAppletInterface interfaces so that the Host On-Demand wrapper can access the custom applet. If the custom code has components directly added to the applet, developer must add them to a separate panel and then add this panel to the applet container. Rest of the customer code will work as it is. Step:1 – Modify the custom class to implement the required interfaces Sample applet modified code: Create a custom jar with all the required manifest parameters, e.g. customJar.jar has TermTest.class file. Step:2 – Configuring the Host On-Demand page. From Host On-Demand version 12 onwards, any html page comes with an associated JNLP file. This JNLP file has all the required jars listed as part of the “preloadComponentList”. Note: To be able to use Programmable Host On-Demand, users must select this component in preload option in deployment wizard, it is not enabled by default. The jar with custom code needs to be added as an additional archive using deployment wizard. The JNLP file can also be edited later. Administrator must place the Java archives in the Host On-Demand publish directory. HTML parameter Name: AdditionalArchives HTML parameter Values: Names of archives, without file extensions separated by commas. Example: HTML parameter Name: AdditionalArchives HTML parameter Values: customJar,customJar1 Edit the following parameters in the JNLP file:
Below is a Sample JNLP file: Now Programmable Host On-demand users can access their page by using either one of the below URL’s http://localhost/hod/TermTest.html or http://localhost/hod/TermTest.jnlp Special considerations:
Some references
2 Comments
7/29/2019 04:49:08 am
I am glad that you shared this with us and I really appreciates your work as well. Great share!
Reply
7/29/2019 11:17:21 pm
I admire this article for the well-researched content and excellent wording
Reply
Leave a Reply. |