ColdFusion MX Tag and Function Reference
A compact recognition guide to the tags, files, scopes, and functions most likely to appear in an MX-era application.
Purpose: This is a practical recognition guide, not a replacement for the complete vendor language reference. Compatibility can depend on the exact updater and edition.
Core Control and Output Tags
| Tag | Use |
cfset | Assign a variable or call a function. |
cfoutput | Evaluate expressions and output query rows. |
cfif, cfelseif, cfelse | Conditional flow. |
cfswitch, cfcase | Multi-branch selection. |
cfloop | Numeric, list, collection, condition, or query loops; remember that direct array looping is later than MX. |
cfinclude | Execute another template in the current context. |
cfparam | Set a default and optionally validate type. |
cfabort | Stop request processing. |
cflocation | Send a redirect; commonly use addtoken="false". |
cfheader, cfcontent | Control HTTP response headers and content. |
Database Tags
| Tag | Use |
cfquery | Execute SQL or Query of Queries. |
cfqueryparam | Bind and validate a dynamic SQL value. |
cftransaction | Group related database operations atomically. |
cfstoredproc | Call a stored procedure with parameters and results. |
Application and State
| Tag/File | Use |
cfapplication | Define classic application and session settings. |
Application.cfm | Run application setup at the beginning of each request. |
OnRequestEnd.cfm | Run request-end template logic in the classic model. |
Application.cfc | MX 7+ lifecycle component. |
cflock | Coordinate access to shared scopes or named resources. |
cfcookie | Create or expire browser cookies. |
Components and Functions
| Tag | Use |
cfcomponent | Define a CFC. |
cffunction | Define a method or user-defined function. |
cfargument | Define a function argument. |
cfreturn | Return a value. |
cfinvoke | Invoke a CFC method or web service. |
cfobject | Create certain component, COM, CORBA, Java, or web-service objects. |
cfproperty | Describe component properties and service metadata. |
Integration and Files
| Tag | Use |
cfmail | Send email. |
cffile | Read, write, append, move, delete, or upload files. |
cfdirectory | List and manage directories. |
cfhttp | Call an HTTP endpoint. |
cfftp | Interact with FTP servers. |
cfexecute | Run an external process; high-risk and often restricted. |
cfldap | Query or modify an LDAP directory. |
Errors and Diagnostics
| Tag | Use |
cftry, cfcatch | Handle exceptions. |
cfthrow, cfrethrow | Create or propagate exceptions. |
cferror | Configure classic request or exception error templates. |
cflog | Write an application log entry. |
cfdump | Inspect variables during development. |
cftrace | Add information to debugging output. |
MX 7 Features Commonly Seen
| Feature | Use |
Application.cfc | Application lifecycle methods. |
cfdocument | Generate PDF or FlashPaper output from content. |
cfreport | Generate reports designed with Report Builder. |
cfcalendar, Flash forms, XForms | Rich form controls associated with the era; usually replace rather than revive for modern public applications. |
| Event gateways | Enterprise integrations for asynchronous events such as messaging, SMS, and directory watching. |
Frequently Used MX-Compatible Functions
ArrayNew, ArrayAppend, ArrayLen, StructNew, StructKeyExists, StructInsert, ListFindNoCase, ListLen, Trim, Len, LCase, UCase, Val, DateFormat, TimeFormat, CreateDateTime, CreateTimeSpan, HTMLEditFormat, URLEncodedFormat, Hash, CreateUUID, ExpandPath, GetDirectoryFromPath, GetCurrentTemplatePath, and CreateObject.
Fast Legacy-Code Reading Checklist
- Which scopes are used explicitly and implicitly?
- Is every dynamic SQL value parameterized?
- Are CFC method variables declared with
var?
- Which files are application entry points?
- What depends on Administrator configuration?
- Which templates are remotely reachable?
- Where are output encoding and authorization enforced?
- What scheduled tasks or external systems call the application?