You should not be creating the REQUEST structure with StructNew(), REQUEST
is already there, just assign the variables.

And generally you want to define APPLICATION variables in OnApplicationStart
and SESSION in OnSessionStart.

--- Ben


-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 17, 2007 4:08 PM
To: CF-Talk
Subject: What is happening to my request variables?

I'm trying to use request variables set in the onRequestStart method of 
an Application.cfc file.  This is not something I do very often.  For 
some reason I can not fathom the variables are not making it to the body 
of the request.  Am I missing some basic understand here?

Application.cfc
<cffunction name="OnRequestStart" output="false">
    <cfargument name = "request" required="true"/>
   
    <cfscript>
        request = structNew();
        request.logout = "test";
        request.errorMsg = "<h2>&nbsp;</h2>";
        request.foobar = true;
        session.foobar = true;
        application.foobar = true;
    </cfscript>
  ....
</cffunction>

index.cfm
    <cfdump var="#request#">
    <cfdump var="#session#">
    <cfdump var="#application#">

Session works, Application works, request is empty.  Interestingly on 
another template the request scope is working as expected.

TIA
Ian





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294947
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to