Adobe COLDFUSION 9 Manual page 230

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Building Blocks of ColdFusion Applications
You can build CFX tags using C++ or Java.
Note: ColdFusion provides several different techniques to create reusable code, including custom tags. For information
on all of these techniques, see
Before you begin developing CFX tags in Java
Before you begin developing CFX tags in Java, configure your Java development environment. Also, it can be helpful
to review the examples here before you create CFX tags.
Sample Java CFX tags
Before you begin developing a CFX tag in Java, it can be useful to study sample CFX tags. You can find the Java source
files for the examples for Windows in the cfx\java\distrib\examples subdirectory of the main installation directory. In
UNIX systems, the files are located in the cfx/java/examples directory. The following table describes the example tags:
Example
HelloColdFusion
ZipBrowser
ServerDateTime
OutputQuery
HelloWorldGraphic
Setting up your development environment to develop CFX tags in Java
You can use a wide range of Java development environments, including the Java Development Kit (JDK) from Sun, to
build Java CFX tags. You can download the JDK from Sun http://java.sun.com/j2se.
Adobe recommends that you use one of the commercial Java IDEs, so you have an integrated environment for
development, debugging, and project management.
Configuring the classpath
To configure your development environment to build Java CFX tags, ensure that the supporting classes are visible to
your Java compiler. These classes are located in the cfx.jar archive, located in one of the following directories:
cf_root/wwwroot/WEB-INF/lib
Server configuration
cf_webapp_root/WEB-INF/lib
J2EE configuration
Consult your Java development tool documentation to determine how to configure the compiler classpath for your
particular environment.
The cfx.jar archive contains the classes in the
deploying Java CFX tags.
When you create new Java CFX tags, compile them into the WEB-INF/classes directory. Doing so simplifies your
development, debugging, and testing processes.
"Creating ColdFusion
Elements" on page 146.
Action
Prints a personalized greeting.
Retrieves the contents of a ZIP archive.
Retrieves the date and time from a network
server.
Returns a ColdFusion query in an HTML table.
Generates a "Hello World!" graphic in JPEG
format.
com.allaire.cfx
Last updated 8/5/2010
Demonstrates
The minimal implementation required to create a CFX
tag.
How to generate a ColdFusion query and return it to
the calling page.
Attribute validation, using numeric attributes, and
setting variables within the calling page.
How to handle a ColdFusion query as input, throw
exceptions, and generate dynamic output.
How to dynamically create and return graphics from a
Java CFX tag.
package, which are required for developing and
225

Advertisement

Table of Contents
loading

Table of Contents