Logo F2FInterview

Coldfusion Interview Questions

Q   |   QA

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.

 

Scope

Description

Variables

These are local variables. These variables can not be used in custom tags

Attributes

These variables are used in custom tags.

Caller

Caller is used in the custom tag to read or to set with in template that is being called.

Arguments

Arguments are used in coldfusion functions.

This

It is used within the component.

Request

It is used for the current request.

CGI

CGI refers to the current request environment. These are read only.

Form

These variables are submitted through form using post.

URL

These are passed through URL.

Server

These are server level variables that are available for all applications in the server.

Application

These are application lever variables. Available throughout the application.

Session

These are available only for the current users session.

Client

Client variables are stored in the server registry or database.

Cookie

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:
<cffile action="upload"
fileField="fileUpload"
destination="C:\docs">

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: