
Understanding the Web Application Framework
215
ColdFusion does not attempt to automatically evaluate Application, Session, or
Server variables. You must use variable prefixes with these variables, as in
Session.variablename or Application.variablename. As a general rule you should
prefix all these variables with their scope identifier.
ColdFusion provides locking functions to manage access to Session, Application,
and Server variables. Because these variables are kept in your server’s memory, you
must lock them when you use them to prevent errors that arise from simultaneous
access.
Caution
Understanding lock management and using locks effectively is vital to correctly
using Session, Application, and Server scope variables. For more information on
locking, see “Locking Code with cflock” on page 233.
Custom error handling
You can use the
cferror
tag to display customized HTML pages when errors occur in
your application. This allows you to maintain a consistent look and feel within your
application even when errors occur. It also allows you to optionally suppress the
display of error information.
For more information, see “Generating Custom Error Messages with cferror” on page
199.
Web server security integration
You can integrate your applications with the user authentication and security
provided by your Web server. In addition, the ColdFusion Server offers a security
framework that controls access to applications, pages, data sources, and users. You
set the bounds of a security domain using the
cfauthenticate
tag.
For more information, see Chapter 19, “Application Security” on page 355.
Application
Contains variables that are available to all pages in an application
for all clients. Application variables are stored in memory and time
out after a period of inactivity or when the server shuts down.
You can access the Application scope as a data structure. You
must use the Application scope prefix in the variable name.
Server
Contains variables that are available to all applications in a server
and all clients. Server variables are stored in memory. They do not
time out, and are only deleted when the server stops running.
You cannot access the Server scope as a data structure. You must
use the Server scope prefix in the variable name.
Variable Scope Description
Содержание COLDFUSION 5-DEVELOPING
Страница 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Страница 58: ...38 Chapter 3 Querying a Database ...
Страница 134: ...114 Chapter 7 Updating Your Database ...
Страница 210: ...190 Chapter 10 Reusing Code ...
Страница 232: ...212 Chapter 11 Preventing and Handling Errors ...
Страница 238: ...218 Chapter 12 Using the Application Framework ...
Страница 262: ...242 Chapter 12 Using the Application Framework ...
Страница 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Страница 320: ...300 Chapter 15 Indexing and Searching Data ...
Страница 336: ...316 Chapter 16 Sending and Receiving E mail ...
Страница 374: ...354 Chapter 18 Interacting with Remote Servers ...