Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

cfapplication and this.mapping for component

$
0
0

Hi,

 

Sorry to ask but I am struck and don't know where to go on.  Any suggestions are appreciated. Here is the structure of the site.  All the components are inside the components directory.  With et directory, I'd like to create an Application.cfc for that.  Files in et directory will call up functions in components directory.  I tried to create this.mappings in et Application.cfc but don't seem to recognize or work.  What do I need in sub Application.cfc (et folder) to call components?

 

Application.cfc (root application.cfc)

-components folder

-ce folder

-et folder

     - Application.cfc

     -index.cfm

     -test.cfm

 

With the root Application.cfc, it has the following:

<cfcomponent displayname="Application" output="true" hint="Handle the application.">

 

<!--- set up per application mappings --->

  <cfset this.mappings = {}>

  <cfset this.mappings["/components"] = GetDirectoryFromPath( GetCurrentTemplatePath() ) & "components">

  <cfset this.mappings["/ce"] = GetDirectoryFromPath( GetCurrentTemplatePath() )>

 

    <!--- Set up the application. --->

    <cfset THIS.Name = "Test" />

    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 1, 0, 0 ) />

    <cfset THIS.SessionManagement = true />

    <cfset THIS.SessionTimeout = CreateTimeSpan( 0, 1, 0, 0 ) />

    <!---<cfset THIS.SetClientCookies = true />--->

    <cfset THIS.SetClientCookies = false />

    <cfset THIS.loginstorage="Session">

   

</cfcomponent>


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>