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 267365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:32:23+00:00 2026-05-11T23:32:23+00:00

i was blocked by a coldfusion problem, any suggestions are appreciated. now lemme decribe

  • 0

i was blocked by a coldfusion problem, any suggestions are appreciated. now lemme decribe my problem.


i have an Application.cfc in my website root, the content in it is as follows:

<cfcomponent output="false">
    <cffunction name="onRequest" returnType="void">
        <cfargument name="thePage" type="string" required="true">
        <cfinclude template="#arguments.thePage#">
    </cffunction>
</cfcomponent>

and also i have a cfm template of which the name is test.cfm, it’s content is listed as follows:

<cfdump var="#variables.this#"><br /><br /><br /><br /><br /><br />
<cfdump var="#this#">

now if you request the test.cfm, everything is ok, but when i delete the onRequest method in Application.cfc and request test.cfm again, it complaints that "Element THIS is undefined in VARIABLES. ", i don’t know why, can anybody explain it? great thanks.

ps:

you can add as many functions into Application.cfc, such as onSessionStart, onSessionEnd, onApplicationStart, onApplicationEnd…,
but if there is not a onRequest method, you request test.cfm and get error. i just don’t know why.

  • 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-05-11T23:32:24+00:00Added an answer on May 11, 2026 at 11:32 pm

    It’s because the this scope refers to a cfc instance. When you include test.cfm from within application.cfc this refers to the application.cfc instance. When you call test.cfm directly this does not exist because the request did not go through application.cfc, so you’re not inside a cfc instance.

    Not sure what you were trying to do, but you probably don’t want to use this outside of a cfc. If you want to dump the application scope from test.cfm just do this instead:

    <cfdump var="#application#"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website a part of which should be blocked with a login
I'm now blocked by this problem the entire day, read thousands of google results,
In my application I have blocked incoming calls, so it’s getting redirected to configured
I have a website which google blocked because it had badware i removed the
Apple have long blocked mobile Safari from playing sounds – the usual JavaScript commands
I'm blocked on a total refresh of my application. I'm using Three20 framework and
I have members that can be blocked and when the member is blocked I
Turkish government have blocked some IPs including Google Analytics. This caused all the web
The problem is that I am trying to make certain tiles blocked so the
I have a managed thread which is waiting, blocked, in an unmanaged code (specifically,

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.