To register or modify a Java applet in ColdFusion, use the Add/Edit Registered Java Applet page. Registering an applet lets you use the cfapplet tag.
If you are registering a new Java applet, install the Java class files and any other files required for the class. Make a note of the installation path, because you must specify the code base arguments when you register the applet.
To access the Add/Edit Registered Java Applet page:
For new registration, select Extensions > Java Applets, and click Register New Applet. The Add/Edit Registered Java Applet page appears.
For existing registration, in the Registered Java Applets table, click the name of the Java applet registration that you want to view or modify.
On the Add/Edit Registered Java Applet page, specify or modify the following information:
Option |
Description |
Applet Name |
Provide a name for the Java applet. |
Code |
Identify the name of the file that contains the applet subclass. This filename is relative to the code base URL. The *.class file extension is not required. |
Code Base |
Provide the URL of the code base; the directory that contains the applet components. The applet class files must be located within the web browser root directory; for example, http://<servername>/classes.
Note: This field is not required if the Java applet components are contained in a JAR file. For more information, see the Archive option. |
Archive |
(Optional) If the Java applet components are stored in a jar file, enter the jar filename in the Archive text box. |
Method |
(Optional) Specify the method name in the applet that returns a string value. This method name is used in the name attribute of the cfapplet tag to populate a form variable with the method's value. If the applet has no method, leave this field blank. |
Height |
Enter a measurement in pixels for the vertical space for the applet. |
Width |
Enter a measurement in pixels for the horizontal space for the applet. |
Vspace |
Enter a measurement in pixels for the space above and below the applet. |
Hspace |
Enter a measurement in pixels for the space on each side of the applet. |
Align |
Select an alignment option. |
Not supported message |
Specify a message that will be displayed by browsers that do not support Java applets. You can override this message with a different message notsupported attribute in the cfapplet tag. |
Parameter Name |
Enter a name for each required applet parameter. Your Java applet typically provides the parameter name needed to use the applet. Enter each parameter in a separate parameter field. |
Value |
Enter a default value for every parameter name specified. Click Add to add the values for the parameters. Your applet documentation provides guidelines on valid entries. |
To save and apply the registration information, click Submit.