Last active
November 10, 2015 17:45
-
-
Save elpete/ed3d5183d3e792f1ca9a to your computer and use it in GitHub Desktop.
Default CommandBox-generated Application.cfc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
******************************************************************************** | |
Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp | |
www.ortussolutions.com | |
******************************************************************************** | |
*/ | |
component { | |
// Application properties | |
this.name = hash( getCurrentTemplatePath() ); | |
this.sessionManagement = true; | |
this.sessionTimeout = createTimeSpan(0,0,30,0); | |
this.setClientCookies = true; | |
// COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP | |
COLDBOX_APP_ROOT_PATH = getDirectoryFromPath( getCurrentTemplatePath() ); | |
// The web server mapping to this application. Used for remote purposes or static purposes | |
COLDBOX_APP_MAPPING = ""; | |
// COLDBOX PROPERTIES | |
COLDBOX_CONFIG_FILE = ""; | |
// COLDBOX APPLICATION KEY OVERRIDE | |
COLDBOX_APP_KEY = ""; | |
// JAVA INTEGRATION: JUST DROP JARS IN THE LIB FOLDER | |
// You can add more paths or change the reload flag as well. | |
this.javaSettings = { loadPaths = [ "lib" ], reloadOnChange = false }; | |
// application start | |
public boolean function onApplicationStart() { | |
application.cbBootstrap = new coldbox.system.Bootstrap( COLDBOX_CONFIG_FILE, COLDBOX_APP_ROOT_PATH, COLDBOX_APP_KEY, COLDBOX_APP_MAPPING ); | |
application.cbBootstrap.loadColdbox(); | |
return true; | |
} | |
// request start | |
public boolean function onRequestStart(String targetPage) { | |
// Process ColdBox Request | |
application.cbBootstrap.onRequestStart( arguments.targetPage ); | |
return true; | |
} | |
public void function onSessionStart() { | |
application.cbBootStrap.onSessionStart(); | |
} | |
public void function onSessionEnd( struct sessionScope, struct appScope ) { | |
arguments.appScope.cbBootStrap.onSessionEnd( argumentCollection=arguments ); | |
} | |
public boolean function onMissingTemplate( template ) { | |
return application.cbBootstrap.onMissingTemplate( argumentCollection=arguments ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
application.cbBootstrap = new coldbox.system.Bootstrap( | |
COLDBOX_CONFIG_FILE, | |
COLDBOX_APP_ROOT_PATH, | |
COLDBOX_APP_KEY, | |
COLDBOX_APP_MAPPING | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment