Paul Smith wrote:
>How do you output its value?
>
>>session.sessionid is a value which is set by the CF server, not by the user,
Session and application variables are stored as structures, so you
can view them by looping through the structure. Just add this bit of
code to a page and it will output your variables.
<h3>Application Variables</h3>
<cflock name="#application.applicationName#" timeout="30" Type = "ReadOnly">
<cfloop collection="#application#" item="appVar">
<cfoutput>
key = #appVar# (Value = #application[appVar]#)<br>
</cfoutput>
</cfloop>
</cflock>
<p>
<h3>Session Variables</h3>
<cflock name="#session.SessionID#" timeout="30" Type = "ReadOnly">
<cfloop collection="#session#" item="sessionVar">
<cfoutput>
key = #sessionVar# (Value = #session[sessionVar]#)<br>
</cfoutput>
</cfloop>
</cflock>
For more detailed information check out the book "Mastering
ColdFusion 4" by Arman Danesh. It covers application and session
variables, and the use of cflock in detail. In fact, that's were I
scooped this code from. The book is worth it for the application
framework and error handling chapters alone.
Mark Zukiwsky
Edmonton, Canada
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.