Enabling Session Variables

As with client variables, you must enable session variables using an Application.cfc file before you can use them in your code. Table 20.4 lists the additional attributes relevant to session variables. In general, all you need to do is specify a name and then set sessionManagement="Yes".

Table 20.4. <CFAPPLICATION> Attributes Relevant to Session Variables
AttributePurpose
nameA name for your application.
sessionManagementYes or No. Set to Yes to enable the use of session variables. If you attempt to use session variables in your code without setting this attribute to Yes, an error message will be displayed when the code is executed.
sessionTimeoutOptional. How long you want your session variables to live in the server’s ...

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.