On every weekend I spend some time to learn ColdFusion. This weekend also, I have planned to create one application. So, First, I just write to start the Application.cfc. Suddenly, I'm thinking about 'Can we able to create a application without application name?'.
I know the importance of the application name. But, I just tried the below steps,
- Create a new folder in the web root called 'testApplication'.
- Inside, just create Application.cfc and index.cfm file.
In the Application.cfc just write below code,
component output="false" { public any function onApplicationStart() { Application.user = "jawa"; } }And, Inside of the index.cfm file, I just dump the Application scope.
After running the application, I get the below result from Application scope dump.
I'm expecting, it is throwing an error like
'Application name is required or some other errors'
. But, the application was run without application name on CF server.
Guys, Do you know how this is working?

For the above question, I searched with CF docs and found the solution.
For security reasons, CF prevents the creation of unnamed applications by default. However, the ColdFusion Administrator exposes the setting for this under
Server Settings. Please see the below sample screen.By default, this flag is not enabled on ColdFusion which means we can able to create an application without mentioning application name on Application.cfc
But, if we enabled this flag means, we couldn't able to create an application without application name. it's throwing an error. Please see the below screenshot.