ABOUT US

|

SUPPORT

|

BLOG

DOWNLOADS    

 

 

 

 


 

 

Displaying Java Applets in WebRenderer Swing Edition

 

 

 

 

 

 

Java Applets are not enabled in the WebRenderer Swing Edition by default. However, they can be enabled by using the IMozillaBrowserCanvas.setAppletMode(int mode) function. This function is used to enable or disable applets, and to enable Applets with or without security.

The Applet enablement mode can be one of three constants defined in IMozillaBrowserCanvas:

DISABLE_JAVA_APPLETS
ENABLE_JAVA_APPLETS
ENABLE_JAVA_APPLETS_WITHOUT_SECURITY

Although this method is called on a single IMozillaBrowserCanvas instance, it affects all browsers spawned from BrowserFactory, including those created after the method is called.

Applet Security

When you call the setAppletMode method with ENABLE_JAVA_APPLETS, WebRenderer will install a SecurityManager and a new Policy. This Policy will grant AllPermissions to your application except Applets loaded by WebRenderer.

If the ENABLE_JAVA_APPLETS constant is utilized, a SecurityMaganger and Policy will be installed and remain installed until the application is restarted. Calling this method afterwards with ENABLE_JAVA_APPLETS_WITHOUT_SECURITY will simply tell the Policy to grant AllPermissions to Applets (it will not remove the Policy and SecurityManager).

If WebRenderer is run in a trusted environment and it is safe to let Applets run with full permissions, then this can be performed with the ENABLE_JAVA_APPLETS_WITHOUT_SECURITY option. This enables Applets without installing a Security Manager or Policy file. In general this option is only recommended for trusted environments or if you are running your own SecurityManager.

The DISABLE_JAVA_APPLETS will prevent Applets from running within the WebRenderer Swing Edition.

Applet Proxy Settings

If the WebRenderer application is using proxy settings to access the internet, these settings will also need to be set for Applets. The following BrowserFactory methods need to be called to enable Applets to run through the proxy server:

setAppletProxySettings(String proxyHost, String proxyPort)
setAppletProxyAuthentication(String username, String password)

The proxy server can be bypassed for Applets on specified domains by using the following method:

setAppletProxyBypass(String bypasses)

 

 

 

 

 

 

 

 

Copyright � JadeLiquid Software - www.jadeliquid.com