Embedding Java Applets; Registering A Java Applet - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

Embedding Java Applets

Embedding Java Applets

The
you must first register your Java applet using the ColdFusion Administrator Java
Applets page (under Extensions on the Server tab). In the Administrator, you define
the interface to the applet, encapsulating it so that each invocation of the
tag is very simple.
The
When an applet is registered, you enter just the applet source and the form variable
name:
<cfapplet appletsource="Calculator"
By contrast, with the HTML
every time you want to use it in a ColdFusion page.

Registering a Java applet

Before you can use a Java applet in your ColdFusion pages, you must register the
applet in the Administrator.
To register a Java applet:
1
2
3
4
5
tag allows you to embed Java applets in a
cfapplet
tag offers several advantages over using the HTML
cfapplet
Return values Since
avoid coding additional JavaScript to capture the applet's return values. You can
reference return values like any other ColdFusion form variable:
.
Form.variablename
Ease of use Since the applet's interface is defined in the Administrator, each
instance of the
cfapplet
name and specify a form variable name.
Parameter defaults ColdFusion uses the parameter value pairs you defined in
the Administrator. You can override these values by specifying parameter value
pairs in
cfapplet.
name="calc_value">
Open the ColdFusion Administrator by clicking on the Administrator icon in the
ColdFusion Program group and entering the Administrator password (if
required).
Click Java Applets on Administrator Server tab to open the Java Applets page.
Click the Register New Applet button to open the Add/Registered Java Applet
page.
Enter a name for the applet that you want to register. Enter the information your
applet requires, and choose the height, width, vertical and horizontal space, and
alignment that you want. Enter the Parameter names and their default values.
Click Create to complete the process.
requires a form field
cfapplet
tag in your pages only needs to reference the applet
tag, you must declare all the applet's parameters
applet
. To use
cfform
cfapplet
cfapplet
tag:
applet
attribute, you can
name
167
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents