Skip to content

Instantly share code, notes, and snippets.

@aqlong
Last active December 13, 2015 17:09
Show Gist options
  • Save aqlong/4946149 to your computer and use it in GitHub Desktop.
Save aqlong/4946149 to your computer and use it in GitHub Desktop.
component output="false" {
/* **************************** APPLICATION VARIABLES ******************* */
THIS.name = "clustertest0006";
// Life span, as a real number of days, of the application
THIS.applicationTimeout = createTimeSpan(0, 1, 0, 0);
// Whether the application supports Client scope variables.
THIS.clientManagement = false;
// Where Client variables are stored; can be cookie, registry, or a data source.
THIS.clientStorage = "cookie"; //cookie||registry||datasource
// Contains ColdFusion custom tag paths.
THIS.customTagPaths = "";
// The Google Maps API key required to embed Google Maps in your web pages.
THIS.googleMapKey = "";
// Name of the data source from which the query retrieves data.
THIS.datasource = "";
// Whether to store login information in the Cookie scope or the Session scope.
THIS.loginStorage = "session"; //cookie||session
THIS.mappings = {};
// Whether to enable validation on cfform fields when the form is submitted.
THIS.serverSideFormValidation = true;
// Whether the application supports Session scope variables.
THIS.sessionManagement = true;
THIS.sessionTimeout = createTimeSpan(0, 0, 30, 0);
// Whether to send CFID and CFTOKEN cookies to the client browser.
THIS.setClientCookies = true;
// Whether to set CFID and CFTOKEN cookies for a domain (not just a host).
THIS.setDomainCookies = true;
// Whether to protect variables from cross-site scripting attacks.
THIS.scriptProtect = false;
/* **************************** APPLICATION METHODS **************************** */
/**
@hint "Runs when an application times out or the server is shutting down."
@ApplicationScope "The application scope."
*/
public void function onApplicationEnd(struct ApplicationScope=structNew()) {
return;
}
/**
@hint "Runs when ColdFusion receives the first request for a page in the application."
*/
public boolean function onApplicationStart() {
return true;
}
/**
@hint "Runs when an uncaught exception occurs in the application."
note: This method is commented out because it should only be used in special cases
*/
/*
public void function onError(required any Exception, required string EventName) {
return;
}
*/
/**
@hint "Runs when a request specifies a non-existent CFML page."
@TargetPage "The path from the web root to the requested CFML page."
note: This method is commented out because it should only be used in special cases
*/
/*
public boolean function onMissingTemplate(required string TargetPage) {
return true;
}
*/
/**
@hint "Runs at the end of a request, after all other CFML code."
*/
public void function onRequestEnd() {
return;
}
/**
@hint "Runs when a request starts."
@TargetPage "Path from the web root to the requested page."
*/
public boolean function onRequestStart(required string TargetPage) {
return true;
}
/**
@hint "Runs when a session ends."
@SessionScope "The Session scope"
@ApplicationScope "The Application scope"
*/
public void function onSessionEnd(required struct SessionScope,
struct ApplicationScope=structNew()) {
return;
}
/**
@hint "Runs when a session starts."
*/
public void function onSessionStart() {
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment