Integrating ColdFusion and Java

Because ColdFusion MX is built on top of J2EE, integration between ColdFusion and Java is better than ever before. ColdFusion is capable of interoperating with Java on several levels. With ColdFusion MX, you can interact with:

  • Java objects, including JavaBeans and Enterprise JavaBeans (EJBs)

  • Servlets and JSP pages

  • JSP tags and tag libraries

Although you certainly don’t have to know Java in order to make use of these capabilities, the more you understand about Java, the easier it is going to be, and the more likely you are to find new and interesting ways to extend your ColdFusion applications. The rest of this section assumes you have some knowledge of how Java works. If you don’t, you may want to spend some time reading up on the fundamentals. One resource I recommend in particular (in addition to the great series of Java books O’Reilly puts out) is Bruce Eckel’s Thinking in Java, 3rd Edition, available as a free download from http://www.mindview.net/Books/. While this book doesn’t cover J2EE, it does do an excellent job of introducing the reader to both object-oriented programming and the Java language.

Calling Java Objects

ColdFusion has the ability to invoke Java class files, JavaBeans, and by extension Enterprise JavaBeans (EJBs), using the cfobject tag (or createObject( ) function). With the explosive growth of Java, this opens up a completely new realm of possibilities for your ColdFusion applications. To call a Java class file or EJB using ...

Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.