Cfml Code Validation; Runtime Validation; The Cfml Syntax Checker - MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual

Table of Contents

Advertisement

194

CFML Code Validation

ColdFusion provides two methods of validating your CFML code:

Runtime validation

The ColdFusion Application Server features two modes of attribute checking for
processing application pages: strict and relaxed. Macromedia recommends that you
always use the strictest possible level of CFML validation.
To enable strict validation:
1
2
The code validator inspects all code and validates most attributes before execution
begins, when the CFML is converted into executable pseudocode. However, tags
with a switch attribute, such as
runtime, are validated during execution. Validation of such attributes causes a slight
performance penalty.
Although dynamically providing an action can save a few lines of code, you should
avoid this practice in the interest of a more complete validation and faster
application performance.
Tip
If a commercially purchased custom tag fails to run, try turning off the Enforce Strict
Attribute Validation setting in the ColdFusion Administrator. If the tag continues to
generate errors, you should contact the tag's vendor.

The CFML syntax checker

You can run the CFML syntax checker to validate your pages. It scans your pages and
returns a list of pages that do not pass the syntax check, with error messages
indicating the cause of each failure. The CFML Syntax checker application page is:
webroot/cfdocs/cfmlsyntaxcheck/cfmlsyntaxcheck.cfm.
Note
The CFML syntax checker cannot detect an invalid attribute combination for
attributes whose values are provided at runtime because it does not execute the
CFML page it checks.
Runtime validation
The CFML Syntax Checker
Open the ColdFusion Administrator Server Settings page.
Select the Enable Strict Attribute Validation check box.
Chapter 11 Preventing and Handling Errors
or
, for which the value is provided at
action
method

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents