Application.cfm page will be used to define application level variables, for example instead of declaring dsn variable in every query you use, you can define the variable in application.cfm page once and can use that variable in every ColdFusion page you use queries to retrieve data from database.
We can definitely use more than one application.cfm pages, however, only the first application.cfm page that the ColdFusion server finds, will be used.
Application.cfm page is not mandatory.
Name, clientStorage, LoginStorage, ClientManagement, ApplicationTimeout, SetclientCcookies, SessionTimeout etc..
ClientManagement can be enabled and disabled as and when we need depending upon the requirement.
1. In the Application.cfc initialization code
This.clientmanagement="True" / "false"
This.clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
2. In appliation.cfm using <cfappliaction> tag attributes
clientManagement="yes" / "no"
clientStorage="[Ur_datasource_name]" / "registry" / "cookie"
[Ur_datasource_name] - Stored in ODBC or native data source. You must create storage repository in the Administrator.
registry - Stored in the system registry.
cookie - Stored on client computer in a cookie. Scalable. If client disables cookies in the browser, client variables do not work.
These are local variables. These variables can not be used in custom tags
These variables are used in custom tags.
Caller is used in the custom tag to read or to set with in template that is being called.
Arguments are used in coldfusion functions.
It is used within the component.
It is used for the current request.
CGI refers to the current request environment. These are read only.
These variables are submitted through form using post.
These are passed through URL.
These are server level variables that are available for all applications in the server.
These are application lever variables. Available throughout the application.
These are available only for the current users session.
Client variables are stored in the server registry or database.
These are global variables. These are stored in the users machine.
By using cffile tag, we can upload a file to the server.
A typical cffile syntax is: