Solved

View all Session Variables

Posted on 2007-03-19
5
325 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 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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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