Skip to main content
March 6, 2007
Question

Help with Application.cfc

  • March 6, 2007
  • 2 replies
  • 345 views
Hi,

This file is driving me nuts...

Here is my code:

<!--- Application.cfc --->
<cfcomponent>

<cfset this.name="CLIENTS" >
<cfset this.clientmanagement=false >
<cfset this.sessionmanagement=true >
<cfset this.setclientcookies=true >
<cfset this.setdomaincookies=false >
<cfset this.sessiontimeout=1*60*60 >
<cfset this.scriptProtect="all">
<cfsetting showdebugoutput="true">

<cffunction name = "onRequestStart">
<cfif not (IsLocalHost(CGI.REMOTE_ADDR))>
<cfinclude template="sorry.cfm">
<cfreturn false>
</cfif>

<!--- set global values that will be used throughout the application --->
<cfset REQUEST.dataSource = "clientdb">
<cfset REQUEST.applicationName = "Clients">
<cfargument name = "thisRequest" required="true"/>
<cfinclude template="mm_wizard_application_include.cfm">
<cfinclude template="inc_header.cfm">

<cfreturn true>
</cffunction>

<cffunction name="onRequestEnd">
<cfinclude template="inc_footer.cfm">
</cffunction>
</cfcomponent>

The error I am getting is this...

Context validation error for tag cffunction.
The start tag must have a matching end tag. An explicit end tag can be provided by adding </cffunction>. If the body of the tag is empty you can use the shortcut <cffunction .../>.

Okay... resisting an urge to beat someone with Forte's book. As far as I can tell, I have that </cffunction> explicit end tag in there. Can anyone here please help me past this. All I wanted to do was restrict access to the local network, enable session variables and set a few other variables.

TC
    This topic has been closed for replies.

    2 replies

    March 6, 2007
    Fixed, and filed mentally for later reference. Thank you so very much...
    Participating Frequently
    March 6, 2007
    Any arguments must be declared before anything else in a function (<cfargument name = "thisRequest" required="true"/> needs to be moved up).