Appleteer Help

Appleteer Overview

Appleteer has two menus, a textfield for entering URLs in the North of the GUI, a label for status messages in the South, and applet controls and configuration options in the West.

Appleteer Menus

File Menu

The Appleteer File menu has one option for the applet, and two for the application.

The second menu item is Exit, and this is not relevant to the applet. To close the applet, either navigate to a new page, or close the browser tab or window.

The other option, used by both is Open applet page, which opens an applet page off the local file system.

View Menu

The Appleteer View menu has significantly more items to choose from.

The first and most important is Help, which opens this page. Please consult Help before asking any further questions.

The next item on the menu provides information on Appleteer, and the spec. that it attempts to implement.

The next item is for Applet info, which gives details of the applet(s) of the currently loaded page. Included in the information is the applet info and parameter info, as coded by the programmer that wrote the applet. Unfortunately, many developers do not bother to code this information, so Appleteer also logs the parameters requested by the applet(s).

The last item in the first section, is to view the HTML Source of the web page that is currently loaded.

The next section contains items to view the Log list and text. The first is easier for browsing, while the second is good when we need to copy/paste results for others.

The third section provides access to the System.out and System.err streams. The err stream may contain information that has not been logged.

The last section has a single item Text Report that combines the System.out & System.err, the log text, HTML source and a summary of the current Threads in a single report.

The Text Report has check boxes to include or exclude sections of the report. The Appleteer Version is the only compulsory item, while the Stacktraces is the only item that defaults to false. Below the check boxes is a text field giving the current length of the report. The length text field changes to a yellow background at 2500 chars, and a red background at 5000 chars.

Other ways to trim the Log section of the report are to:

  • Set the Log history length to a lower number.
  • Set the log level to a higher level.
  • Clear the log.

A typical sequence might be to exit the Text Report (that is too verbose), drop the Log length to 10, increase the level to Warning and Clear Log, then refresh the page - before calling for another Text Report.

Appleteer Configuration

Down the West side of the Appleteer GUI, we see a large button, to start and stop the applet(s) on the page shown, as well as the log configuration controls.

Back Button

Use the back button () to move back in the page history.

Forward Button

Use the forward button () to move forward in the page history.

Start/Stop Button

To start the applet(s) click the > button, it will then change to to stop the applet(s).

Refresh Button

Use the refresh button () to refresh the current page.

Log Settings

Log settings provides access to the Log history length, configurable from the last 10 through the last 500 log messages. Any log messages after this, will cause the oldest messages to be lost. The default is to retain 50 messages.

Below the length spinner is a drop-down of log levels. Set one to only get Log messages that are equal to or greater than that level.

  • Severe - Exceptions or Errors
  • Warning - Potentially dangerous
  • Information - Applet parameter requests
  • Configuration - Applet parameter values
  • Fine
  • Finer - Appleteer method calls
  • Finest - Appleteer debugging print out

We recommend never setting the level above Configuration. Stick to Configuration, Fine, Finer or Finest to get a suitable level of information about applets that are loaded. If you have your own debug logging to do, you might put it at level Fine, the only level not used by Appleteer itself.

Inter-Applet Comms

Java 1.0 allowed inter-applet communications and object sharing, using the methods AppletContext.getApplet(name) and AppletContext.getApplets(). There is some magic behind the scenes of this functionality that we have yet to correctly implement in Appleteer, for want of knowing just how to achieve it.

The thing is, each applet can be loaded using it's own URLClassLoader, based on the applet element codebase and archive attributes. However, if we follow that simple approach, applet sharing is barred. It leads to an exception of the general form seen below, simply because the applets were loaded using distinct class loaders.

Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException:
    OurApplet cannot be cast to OurApplet

Another approach is to add all the codebases and archives together into a classloader that will reach all the resources of all the applets in the page, and use that single classloader to load the applets. Unfortunately this approach leads to 'resource bleed' between the applets - an identically named resource in resource1.jar on the first applet's classpath, might be used for applet 2 which specified resource2.jar for it's own classpath.

Appleteer offers the choice of loading strategies, to the end user. First, it detects whether it is likely that applets within the page are going to attempt inter-applet object sharing (the Hinted checkbox). This test is based on two factors:

  1. The applet web page includes more than one applet element.
  2. At least one applet element has a name attribute defined. This second criterion is no guarantee, since applets might be discovered at runtime, and identified by the default name assigned to them.

The effect of the radio choices are:

  • Never. Will force use of distinct classloaders.
  • When Hinted (default). Based on whether inter-applet comms. is assumed to be used in the web page, the When Hinted option will either use the distinct classloaders when not hinted, or the common classloader when hinted.
  • Always. Will force use of a common classloader.

© 2003-2010 by Andrew Thompson. All rights reserved.
Web hosting compliments of Java Web Hosting.
Java Web Hosting