Whatever message this page gives is out now! Go check it out!

cfapplet

Last update:
May 18, 2026
Warning:
The tag is removed in ColdFusion (2025 release).
For a full list of deprecated features, refer to Deprecated features.

Description

This tag references a registered custom Java applet. To register a Java applet, in the ColdFusion Administrator, select Extensions > Java Applets. Using this tag within a cfform tag is optional. If you use it within cfform, and the method attribute is defined in the Administrator, the return value is incorporated into the form.

Category

Syntax

<cfapplet 
appletSource = "applet name" 
name = "form variable name" 
align = "alignment option" 
height = "height in pixels" 
hSpace = "space on each side in pixels" 
notSupported = "message to display for non-Java browser" 
param_1 = "applet parameter name" 
param_2 = "applet parameter name" 
param_n = "applet parameter name" 
vSpace = "space above and below in pixels" 
width = "width in pixels">
Note: You can specify this tag's attributes in an attributeCollection whose value is a structure. Specify the structure name in the attributeCollection and use the tag's attribute names as structure keys.

See also

History

ColdFusion (2025 release): The tag is removed.
ColdFusion MX:
  • Removed the requirement that you use this tag within a cfform tag.
  • Changed the behavior when this tag is used within a cfform tag; if the method attribute is defined in the Administrator, the return value of the applet's method is incorporated into the form.

Attributes

Attribute
Req/Opt
Default
Description
appletSource
Required
Name of registered applet.
name
Required
Form variable name for applet.
align
Optional
Alignment:
  • Left
  • Right
  • Bottom
  • Top
  • TextTop
  • Middle
  • AbsMiddle
  • Baseline
  • AbsBottom
height
Optional
Height of applet, in pixels.
hSpace
Optional
Space on left and right of applet, in pixels.
notSupported
Optional
See description
Text to display if a page that contains a Java applet-based cfform control is opened by a browser that does not support Java or has Java support disabled, for example:notSupported = "<b>Browser must support Java to view ColdFusion{{Java Applets</b>"}} Default value: <b>Browser must support Java to<br> view ColdFusion Java Applets!</b>
param_n
Optional
Registered parameter for applet. Specify only to override values for applet in ColdFusion Administrator.
vSpace
Optional
Space above and below applet, in pixels.
width
Optional
Width of applet, in pixels.

Usage

You can specify the applet method attribute only in the Administrator, Java Applets view. For other attributes, you can accept the default values in the Administrator view, or specify values in this tag and override the defaults. If Java applet components are stored in a JAR file, enter the information in the J2EE Archives > ColdFusion Administrator. For more information, see Embedding Java applets in the Developing ColdFusion Applications

Example

<p>cfapplet lets you reference custom Java applets that have been 
registered using the ColdFusion Administrator. 
<p>To register a Java applet, open the ColdFusion Administrator and
click "Applets" link under "extensions" section. 
<p>This example applet copies text that you type into a form. Type 
some text, and then click "copy" to see the copied text. 

<cfform action = "index.cfm"> 
<cfapplet appletsource = "copytext" name = "copytext"> 
</cfform>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page