Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

View all Session Variables

Posted on 2007-03-19
5
Medium Priority
?
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

618 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