cfsetting

Description

Controls aspects of page processing, such as the output of HTML code in pages.

Category

Page processing tags, Variable manipulation tags

Syntax

<cfsetting 
  enableCFoutputOnly = "Yes" or "No" 
  showDebugOutput = "Yes" or "No" 
  requestTimeOut = "value in seconds" > 

See also

cfcache, cfflush, cfheader, cfhtmlhead, cfinclude, cfsilent

History

New in ColdFusion MX: The requestTimeOut attribute is new.

New in ColdFusion MX: The catchExceptionsByPattern attribute is obsolete. Do not use it. It does not work, and causes an error, in releases later than ColdFusion 5.

New in ColdFusion 5.0: The structured exception manager searches for the best-fit cfcatch handler. (In earlier releases, an exception was handled by the first cfcatch block that could handle an exception of its type.)

Attributes

Attribute Req/Opt Default Description
enableCFoutputOnly
Required
 
  • Yes: blocks output of HTML that is outside cfoutput tags
  • No
showDebugOutput
Optional
Yes
  • Yes
  • No: suppresses debugging information that would otherwise display at end of generated page.
requestTimeout
Optional


  • Integer; number of seconds. Time limit, after which ColdFusion processes the page as an unresponsive thread. Overrides the timeout set in the ColdFusion Administrator.

Usage

The cfsetting requestTimeout attribute replaces the use of requestTmeOut within a URL. To enforce a page timeout, detect the URL variable and use code such as the following to change the page timeout:

<cfsetting RequestTimeout = "#URL.RequestTimeout#"> 

You can use this tag to manage whitespace in ColdFusion output pages.

If you nest cfsetting tags: to make HTML output visible, you must match each enableCFoutputOnly = "Yes" statement with an enableCFoutputOnly = "No" statement. For example, after five enableCFoutputOnly = "Yes" statements, to enable HTML output, you must have five corresponding enableCFoutputOnly = "No" statements.

If HTML output is enabled (no matter how many enableCFoutputOnly = "No" statements have been processed) the first enableCFoutputOnly = "Yes" statement blocks output.

If the debugging service is enabled and showDebugOutput =" Yes", the IsDebugMode function returns Yes; otherwise, No.

Example

<p>CFSETTING is used to control the output of HTML code in Cold Fusion pages. 
  This tag can be used to minimize the amount of generated whitespace.

<cfsetting enableCFoutputOnly = "Yes">
  This text is not shown
<cfsetting enableCFoutputOnly = "No">
  <p>This text is shown
<cfsetting enableCFoutputOnly = "Yes">
  <cfoutput>
    <p>Text within cfoutput is always shown
  </cfoutput>  
<cfsetting enableCFoutputOnly = "No">
  <cfoutput>
    <p>Text within cfoutput is always shown
  </cfoutput>  

Comments