The cfapplet
tag lets you embed Java applets either on a ColdFusion page or in a cfform
tag. To use the cfapplet
tag, you must first register your Java applet using the ColdFusion MX Administrator Java Applets page (under Extensions). In the ColdFusion MX Administrator, you define the interface to the applet, encapsulating it so that each invocation of the cfapplet
tag is very simple.
The cfapplet
tag within a form offers several advantages over using the HTML applet
tag:
cfapplet
tag requires a form field name
attribute, so you can avoid coding additional JavaScript to capture the applet's return values. You can reference return values like any other ColdFusion form variable: Form.
variablename
.
cfapplet
tag in your pages only needs to reference the applet name and specify a form variable name.
cfapplet
tag.
When an applet is registered, you enter just the applet source and the form variable name:
<cfapplet appletsource="Calculator"
name="calc_value">
By contrast, with the HTML applet
tag, you must declare all the applet's parameters every time you want to use it in a ColdFusion page.
This section describes the following topics: