Using CFX tags

ColdFusion Extension (CFX) tags are custom tags that you write in Java or C++. Generally, you create a CFX tag to do something that is not possible in CFML. CFX tags also let you use existing Java or C++ code in your ColdFusion application. Unlike CFML custom tags, CFX tags cannot have bodies or ending tags.

CFX tags can return information to the calling page in a page variable or by writing text to the calling page.

CFX tags can do the following:

Calling CFX tags

To use a CFX tag, precede the class name with cfx_ and put the name in angle brackets. For example, use the following line to call the CFX tag defined by the MyCFXClass class and pass it one attribute.

<cfx_MyCFXClass myArgument="arg1">

Recommended uses

CFX tags provide one way of using C++ or Java code. However, you can also create Java classes and COM objects and access them using the cfobject tag. CFX tags, however, provide some built-in features that the cfobject tag does not have:

You should consider using CFX tags in the following circumstances:

For more information

For more information on CFX tags, see Chapter 12, "Building Custom CFXAPI Tags".

Comments