Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 248

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Attribute
showDebugOutput
requestTimeout
enableCFOutputOnly
Often, you use the
cfsetting
using it in multi-application environment to override the ColdFusion Administrator settings in one application.
You can place an application-wide
scope application property settings, as the following example shows:
<cfcomponent>
<cfscript>
This.name="MyAppl";
This.clientmanagement="True";
This.loginstorage="Session" ;
This.sessionmanagement="True" ;
This.sessiontimeout=CreateTimeSpan(0,0,1,0);
</cfscript>
<cfsetting showdebugoutput="No" enablecfoutputonly="No">
The
tag in this example affects all pages in an application. You can override the application-wide settings
cfsetting
in the event methods, such as
Using application event handlers
The following table describes the application event CFC methods that you can implement, including when they are
triggered.
Method
onApplicationStart
onApplicationEnd
onSessionStart
onSessionEnd
onRequestStart
onRequest
Use
Specifies whether to show debugging output. This setting cannot enable debugging if it is disabled
in the ColdFusion Administrator. However, this option ensures that debugging output is not
displayed, even if the Administrator enables it.
Specifies the page request time-out. If ColdFusion cannot complete processing a page within the
time-out period, it generates an error. This setting overrides the setting in the ColdFusion
Administrator. Use this setting to increase the page time-out if your application or page frequently
accesses external resources that are slow, such as external LDAP servers or web services providers.
Disables output of text that is not included inside
extraneous text in your ColdFusion pages does not get displayed.
tag on individual pages, but you can also use it in your Application.cfc file. For example,
tag in the component initialization code, normally following the This
cfsetting
, or on individual ColdFusion pages.
onRequestStart
When run
The application first starts: when the first request for a page is processed or the first CFC method is
invoked by an event gateway instance, Flash Remoting request, or a web service invocation.
This method is useful for setting application-wide (Application scope) variables, such as the names
of data sources.
The application ends: when the application times out or the server shuts down.
A new session is created as a result of a request that is not in an existing session, including
ColdFusion event gateway sessions. The application must enable sessions for this event to happen.
A session time-out setting is reached. This event is not triggered when the application ends or the
server shuts down.
ColdFusion receives any of the following: a request, an HTTP request (for example, from a browser),
a message to an event gateway, a SOAP request, or a Flash Remoting request.
The
onRequestStart
event has completed. This method acts as a filter for the requested page
content.
Last updated 1/20/2012
tags. This setting helps ensure that
cfoutput
243

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents