0

I have a Javascript, called printLabel.js which is the source for a jsp, called Admin.jsp has the following

<object type="application/x-java-applet" 
     name="PrintApplet" width="1" height="1"> 
     <param name="codebase" value="applet" /> 
     <param name="cache_archive" value="PrintingApplet-0.1.3.jar" /> 
     <param name="code" value="com.abc.PrintApplet" /> 
     <param name="cache_version" name="1.0.0.1"/> 
     <param name="initial_focus" value="false">
     <param name="permissions" name="all-permissions"/>
 </object>

The printApplet function is contained in a jar file which is in the applet subfolder of the WAR file.

The javascript has document.PrintApplet.print(p1,p2,p3,p4);

The error that I am getting is that document.PrintApplet.print is not a function

Any assistance would be appreciated.

Trying to get the function recognized.

Jim B
  • 1

1 Answers1

0

Via Oracle in a report from 2020:

During the past seven years, browser vendors have withdrawn support for plugins such as Flash, Silverlight, and Java in their products, with Microsoft Internet Explorer 11 being the only major browser still allowing them. Support for running Applets in browsers was only possible while browser vendors were committed to standards-based plugins. With that no longer being the case, Applet support ended in March 2019.

There is no way to run applets in modern browsers.

You can interact with server-side Java (including JSPs) via Ajax.

You can transpile Java to WASM and run it in browsers (subject to the limitations of WASM).

Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335