Reinitialize the application. You probably added this after the
onApplicationStart() ran, which means its not set since that method only
runs once, when the application starts up. A temporary way to do this is do
add <cfset onApplicationStart() /> to your onRequestStart method, but be
aware that this is not thread safe and should only be done in development
unless proper locking is employed.


On Wed, Apr 30, 2008 at 1:58 PM, marc -- <[EMAIL PROTECTED]> wrote:

> Hello,
> In Application.cfc I have this
> <cffunction name="onApplicationStart" access="public"
> description="initialize application parameters" output="false"
> returntype="boolean">
> [...do stuff...]
>        <cfset APPLICATION.localIps="127.0.0.1,62.194.197.93">
>
>        <cfreturn true>
> </cffunction>
>
> and
>
> <cffunction name="onError" access="public" output="true"
> returntype="void">
>        <cfargument name="exception" type="Any" required="true">
>        <cfargument name="eventName" type="string" required="false"
> default="">
>
>        <cfif ListFind(APPLICATION.localIps,CGI.REMOTE_ADDR)>
>                <cfoutput>Error on event:
>  [#arguments.eventname#]</cfoutput>
>                <cfdump var="#arguments.exception#">
>        <cfelse>
>                <cfinclude template="/includes/error.cfm">
>        </cfif>
> </cffunction>
>
> When I call a page it gives me this error:
>
> " Element LOCALIPS is undefined in APPLICATION."
> 107 :   <cfif ListFind(THIS.localIps,CGI.REMOTE_ADDR)>
>
> Why doesn't Coldfusion recognize this key in the Application scope? I set
> it allright. Also, if I change APPLICATION to THIS in both
> onApplicationStart and onError it cannot find localIps in THIS.
>
>
> 

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304529
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