About Coldfusion, Java, And J2Ee; About Coldfusion And Client-Side Javascript And Applets; About Coldfusion And Jsp - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

About ColdFusion, Java, and J2EE

ColdFusion MX is built on a J2EE-compliant Java technology platform. This lets ColdFusion
applications take advantage of, and integrate with, J2EE elements. ColdFusion pages can do any
of the following:
Include JavaScript and client-side Java applets on the page.
Use JSP tags.
Interoperate with JSP pages.
Use Java servlets.
Use Java objects, including JavaBeans and Enterprise JavaBeans.

About ColdFusion and client-side JavaScript and applets

ColdFusion pages, like HTML pages, can incorporate client-side JavaScript and Java applets. To
use JavaScript, you write the JavaScript code just as you do on any HTML page. ColdFusion
ignores the JavaScript and sends it to the client.
The
tag simplifies using Java client-side applets.
cfapplet
To use an applet on a ColdFusion page:
Register the applet .class file in ColdFusion MX Administrator Java Applets Extensions page.
1
(For information on registering applets, see the ColdFusion MX Administrator online Help.)
Use the
2
cfapplet
assigned in ColdFusion MX Administrator.
For example, ColdFusion includes a Copytext sample applet that copies text from one text box to
another. The ColdFusion Setup automatically registers the applet in the Administrator. To use
this applet, incorporate it on your page. For example:
<cfform action = "copytext.cfm">
<cfapplet appletsource = "copytext" name = "copytext">
</cfform>

About ColdFusion and JSP

ColdFusion MX supports JSP tags and pages in the following ways:
Interoperates with JSP pages: ColdFusion pages can include or forward to JSP pages, JSP pages
can include or forward to ColdFusion pages, and both types of pages can share data in
persistent scopes.
Imports and uses JSP tag libraries: the
its tags.
ColdFusion pages are not JSP pages, however, and you cannot use most JSP syntax on
ColdFusion pages. In particular you cannot use the following features on ColdFusion pages:
Include, Taglib, and Page directives
libraries, and the
ColdFusion
GetPageContext
JSP tags and tag libraries" on page 739
on page
740.
Expression, Declaration, and Scriptlet JSP scripting elements
elements and expressions.
736
Chapter 33: Integrating J2EE and Java Elements in CFML Applications
tag to call the applet. The
cfimport
(or
) method of the page context object returned by the
include
forward
function to include pages. For more information, see
attribute must be the Applet name
appletSource
tag imports JSP tag libraries and lets you use
Instead, you use CFML
and
"Interoperating with JSP pages and servlets"
tag to import tag
import
"Using
Instead, you use CFML

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents