User Guide

Table Of Contents
917
CHAPTER 37
Integrating J2EE and Java Elements in
CFML Applications
This chapter describes how to integrate J2EE elements, including JSP pages and servlets; JSP tags;
and Java objects, including Enterprise JavaBeans (EJBs); into your ColdFusion application.
It does not explain J2EE concepts or how to program using Java or JSP. It does explain how to use
existing Java and JSP elements in your ColdFusion applications.
Contents
About ColdFusion, Java, and J2EE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917
Using JSP tags and tag libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 921
Interoperating with JSP pages and servlets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 922
Using Java objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928
About ColdFusion, Java, and J2EE
Macromedia 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
cfapplet tag simplifies using Java client-side applets.