Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8060193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:54:38+00:00 2026-06-05T09:54:38+00:00

Just a little clueless… using Coldfusion8, if I dump my session to file: <cfdump

  • 0

Just a little clueless… using Coldfusion8, if I dump my session to file:

<cfdump output="D:\ColdFusion8\logs\dump.txt" var="#Session#">

this includes:

accounttyp: whatever

I get the same result if I only dump this parameter:

<cfdump output="D:\ColdFusion8\logs\dump.txt" var="#Session.accounttyp#">

Question:
If it’s defined and dump-able, how come checking isDefined like so:

<cfdump output="D:\ColdFusion8\logs\dump.txt" var="#IsDefined(Session.accounttyp)#"> 

turns out to be NO? If it’s there it should be defined, shouldn’t it?

Thanks for some clarification.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:54:39+00:00Added an answer on June 5, 2026 at 9:54 am

    <cfdump output="D:\ColdFusion8\logs\dump.txt"
    var="#IsDefined(Session.accounttyp)#">

    It is because the syntax is incorrect. IsDefined expects the name of a variable ie a string. By omitting the quotes around the variable name, the session variable gets evaluated first, and its value (“whatever”) is what gets passed into IsDefined. So the code is actually checking for a variable named “whatever”, not “session.accounttyp” ie:

        <cfif IsDefined("whatever")>
    

    That is why the result is NO. This is the correct syntax. (Notice the quotes and lack of pound signs).

        <cfif IsDefined("Session.accounttyp")>
    

    However, I would suggest switching to structKeyExists. It is generally preferred over IsDefined because it is more precise.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This sounds funny..just a little experiment. i wanted to simulate a drag drop of
I'm coming up just a little short on this. I know google has a
Just a little background on my project: I'm implementing an SMS encryption program using
maybe this is just a little misunderstanding but how can a programming language be
I'm a Flash(AS3) newbie and this is just a little experiment of mine. I'm
I want to do THIS , just a little bit more complicated: Lets say,
I want a sorta basic answer on this one, just a little guidance but
I'm currently using fancyBox 2. Works like a charm, great tool. Just one little
i'm creating a batch file and just a little thing i want to know:
Just a little background: I am using Access 2010 to create forms and VBA

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.