Solved

View all Session Variables

Posted on 2007-03-19
5
321 Views
Last Modified: 2011-10-03
I have just taken over a ColdFusion project and I need to know what session variables have been established.  What is a good way to check?  
0
Comment
Question by:trifecta2k
  • 2
  • 2
5 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 18751273

<cfdump var="#session"#>
0
 
LVL 10

Expert Comment

by:stu215
ID: 18751284
<cfdump var="#session#"><cfabort>
Should work...

You can also use the collection attribute of cfloop to loop over the keys in the session scope.
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 18751300

 oops, type-o, sorry..

<cfdump var="#session#">

 This will dump all session variables to the page in a hierarchical HTML format.

0
 
LVL 10

Expert Comment

by:stu215
ID: 18751443
Heres a cfloop example with collection too if ya like ::

<CFLOOP COLLECTION="#session#" ITEM="ThisKey">
<CFOUTPUT>#ThisKey#:</CFOUTPUT>
<CFIF #IsSimpleValue(session[ThisKey])#>
<CFOUTPUT>#session[ThisKey]#</CFOUTPUT>
<CFELSE>
Complex Value
</CFIF><BR>
</CFLOOP>  
0
 
LVL 5

Author Comment

by:trifecta2k
ID: 18751606
Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
PROBLEM: How to add your own buttons to the bottom toolbar with paging info ( result count ). While creating a cfgrid, I ran into an issue where I wanted to embed my own custom buttons where the default ones ( insert / delete / etc… ) are for aes…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now