Rocket Uniface User Forum

 View Only

HTML Widget with a Java Applet: How to stop security warnings

By Uniface Test posted 08-18-2014 05:00

  

(Original creator: Jasper)

Security warnings are hindering the end user when starting a Java applet in the Uniface HTML widget. HtmlWidgetUnifaceInfo.docx on how to stop the security warning and even block them with a so called “rule set”.

Security warnings the old way

According to the documentation of Oracle, the end user will in almost all cases be presented with a warning when starting a Java applet in the browser for the first time. Even the lowest possible security setting in the Java console explains: Medium - All applications are allowed to run with security prompts. See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/jcp/jcp.html Also the list of exceptions shows in the java console that you can be prompted by a security warning:





By switching the cache ON in the Java console the warning is only displayed once. After this the application runs without warnings and can even be re-started.



Other options

Keep the security settings in the Java console on High which by default blocks the applet completely.





Add the URL to the list of exceptions:





n my case this was: file:///D:\usys91\HTML_JavaApplet\mx04\dynamic\applet_ComponentArch_DynamicTreeDemo\build\classes\AppletPage_WithAppletTagUsingJNLP.html Including the page name! This means that the security is not compromised and the warning is only shown once when the cache is on.

Rule set and no warnings at all

As explained earlier, you can run a java applet without security warnings by using a rule set however the applet must be signed for this and a so called deployment rule set jar file must be added. In the following places you can find some documentation. In the next chapters I describe a step by step process to get the Java applet running in a UNIFACE html widget without warnings. https://blogs.oracle.com/java-platform-group/entry/introducing_deployment_rule_sets http://wraithhacker.com/java-deployment-rule-set/

How to stop the security warnings for a known applet

In the following chapters I will take a step by step approach to make it possible to run a known applet in the UNIFACE html widget without bothering the end user with security warnings. The applet JAR file, in this sample, is on the end user computer as well as the html file referring to this applet. Of course the file:/// can be replaced by a server site location like http:// This small manual on how to get the “rule set” working is based on the Dynamictree sample of Oracle. You can find this sample on the following address: http://docs.oracle.com/javase/tutorial/deployment/applet/examplesIndex.html Download the zip file with all the bits and pieces you need: http://docs.oracle.com/javase/tutorial/deployment/applet/examples/zipfiles/applet_ComponentArch_DynamicTreeDemo.zip Before you start, be sure that you have your path variable set to the java bin folder otherwise the command lines shown in the steps won’t work. Used command line tools

CommandDescription
JarCreates a Jar archive
KeytoolTo create a keystore, certificate
JarsignerTo sign a jar archive with a keystore file.

  HtmlWidgetUnifaceInfo.docx

0 comments
0 views

Permalink