Understanding APPLICATION and SERVER Variables This chapter discusses both APPLICATION and SERVER variables. Both types of variables are very important to maintaining state on a server. State maintenance was briefly mentioned in Chapter 8, "URL Variables." Using these variables, you can remember things on a Web site over multiple pages and multiple applications because they are stored in memory on the ColdFusion server. APPLICATION variables can be set for one application on a server. By doing so, you can create variables that are universal to an entire application (but that cannot be used by other applications). SERVER variables are set for the entire server and are available to every application on that server. You can add to the server scope or use variables that are already available in the scope. Some default variables that are available in the server scope are listed in Table 10.1, later in this chapter. Table 10.1. Default SERVER VariablesSERVER VARIABLE | DESCRIPTION |
|---|
SERVER.ColdFusion.AppServer | Contains the name of the application server being used by ColdFusion (will be JRun4 if standalone ColdFusion is used) | SERVER.ColdFusion.Expiration | Holds the server expiration date (if an evaluation version is being used) | SERVER.ColdFusion.ProductLevel | Stores the ColdFusion Product level (such as Standard or Enterprise) | SERVER.ColdFusion.ProductName | Contains the name of the ColdFusion product | SERVER.ColdFusion.ProductVersion | Holds the ColdFusion version information | SERVER.ColdFusion.RootDir | Stores the ColdFusion root (installation) directory | SERVER.ColdFusion.SerialNumber | Holds the ColdFusion server serial number | SERVER.ColdFusion.SupportedLocales | Holds the comma-delimited list of locales that ColdFusion supports | SERVER.OS.AdditionalInformation | Additional information as provided by the operating system | SERVER.OS.Arch | Processor architecture | SERVER.OS.BuildNumber | Operating system build number | SERVER.OS.Name | Stores the name of the operating system | SERVER.OS.Version | Stores the version information for the operating system |
|