Solved

View all Session Variables

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
COLD FUSION 6 34
Restore of mysql database from .SQL file - using Coldfusion 5 54
Combining Queries 7 54
Application.cfm not found issue 2 64
The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Suggested Courses

732 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