I've handled things like this in the past like so:

this.name = getAppName();

Then lower down at the bottom of the Application.cfc I do something like this:

<cffunction name="getAppName" returntype="string">
...your if logic goes here...
<cfreturn whatever />
</cffunction>

-Cameron

On Tue, Aug 10, 2010 at 12:53 PM, Matthew P. Smith <[email protected]> 
wrote:
> I am (finally) transitioning to Application.cfc, as we have just upgraded to
> CF 9.
>
> In my old Application.cfm, I am serving several sites/apps with conditional
> code, something like this:
>
> <cfset currentSiteDomain = cgi.server_name>
>
> <cfif findNoCase("domain1",currentSiteDomain,"1")>
> <cfset request.currentSiteName = "www_domain1_com">
>  <cfset request.applicationname = "www_domain1_com">
> </cfif>
>
> <cfapplication
> name="#request.applicationname#"
>  clientmanagement="Yes"
> sessionmanagement="Yes"
> setclientcookies="Yes">
>
> Should this code go in onrequeststart, or at the top of the cfc definition?
>
> Thank you.


-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: camer...@gmai

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336188
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to