This Applet should be called upon client's request from a JSF page.
Development steps:
1. Managed Bean
1.1 boolean value to enable/disable calling Java Applet
private boolean showApplet = false;
1.2 return the Java Applet HTML invoker
public String getAppletHtml() { if (showApplet) { return "<object type=\"application/x-java-applet\" id=\"the applet\"" + "code=\"ics.jvm.setup.JVMSetupApplet.class\" codebase=\"./\"" + "archive=\"./the-applet.jar\" width=\"0\" height=\"0\">" + "<param name=\"force\" value=\"true\" />"; } return ""; }
1.3 enable/disable action method
public String showApplet() { showApplet = true; return null; }
2. JSF page
2.1 Write the calling tags
Note: You have to set the escape attribute of your
<h:commandLink value="Reset Configuration" action="#{bean.showApplet}" style="color: white; text-decoration: blink;"> <h:outputText value="#{bean.appletHtml}" escape="false" /> </h:commandLink>