Marrying CF and Java

(April 2001-)

We've started a new area devoted to marrying CF and Java. There's quite a lot of ground to cover.

  • Looking to get into Servlet and JSP development? Here's your ticket to success. Charlie is now presenting a 4-day course called "Programming with Servlet and JSP Technology", which was created by Marty Hall, author of the popular book "Core Servlets and JSP". The course is based on the book and is presented with permission of the author.
  • He'll soon offer the "Advanced Servlet and JSP Progamming" course that follows onto that and is based on Marty's book "More Servlets and JSP"
  • For those looking for a brief presentation on Marrying ColdFusion and Java, Charlie's offered thisCFUG presentation several times.
  • Also, see the articles he's written (and writing) for the Java Developers Journal. They're offered here online.
  • There's also an excellent series of articles on the subject of CF/Java integration written by Guy Rish for the ColdFusion Developers Journal. These are a must for anyone getting started with CF/Java integration:
    • A Cold Cup O' Joe, Part 1, Jan 2001
    • A Cold Cup O' Joe, Part 2, Feb 2001
    • A Cold Cup O' Joe, Part 3, Apr 2001
    • A Cold Cup O' Joe, Part 4, Jun 2001
    • A Cold Cup O' Joe, Part 5, Aug 2001
    • A Cold Cup O' Joe, Part 6, Nov 2001
  • Making the transition: Charlie is putting together a couple of one-day seminars related to this: Contact him for more details.
  • Check out a discussion from 4/2001 on the performance benefits of CF versus Java. Someone asserted that java was a clear winner, but Charlie's analysis of that particular example showed that in fact CF was the winner. It's a good discussion of doing database queries in CF versus java.
  • Also, he provided a reply in the Macromedia forums (about that same time) to a very common question asked by those getting started with using CFOBJECT for java. See his reply here.
  • Tips: if you're confused by the difference between the 2 choices for includes in JSP: the include directive (<%@ include file="" %>) and the include action (<jsp:include page="pagename.jsp" flush="true" /> ), don't be.

    Just think of it as the same as the difference between a CFINCLUDE and a custom tag. The parallels are quite striking: The first pulls the other page's code in to be executed in-line with the calling page, while the second pulls in the results of executing the code in the other page. And just as with the CF alternatives, the first allows variables to be shared between the two programs, while in the second case variables are isolated between the two programs.

    There is one fortunate difference. As you can read about at a page of some O'Reilly tips about JSP, there are cases in some JSP containers where after you use the include action, you can't issue any tags that set headers or use <jsp:forward>, because the include action flushes the response buffer to the browser. This is NOT the case with calls to custom tags in CF. You certainly can use CFCOOKIE, CFLOCATION, CFHEADER, etc. after a call to a custom tag, even in Version 5.

  • The page of JSP tips at the O'Reilly JSP book site are some really good tips. Since they're written by the author of the book, I imagine that means that the book is also very good, though I've not read it.
Tips Contents:

| Home | ColdFusion | Articles | Presentations
| User Groups | Other Resources | Press Releases | Company

© 1998-2024, Charles Arehart, SysteManage
Our Practice Makes You Perfect