We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Application.cfc conflicting with root Application

cphongsavath
Regular Participant

Application.cfc conflicting with root Application

 Hi I am using the sample coldfusion code and it looks like the root application is running first before it gets to the application.cfc in my subdirectory where the sample code is located.  


Is there a way around this?

4 REPLIES 4
David_J
Employee

If I am understanding you correctly, you're saying that you already have an Application.cfc and it's not picking up whats being set in the Application.cfc that is provided in the sample? If that's the case, you should just be able to move all the variables set in Application.cfc from the sample into the one you already have located in your root. This should make sure those variables are set and resolve any errors related to any variables not being defined in Application.cfc.


 


I hope this helps. Please let me know if I've misunderstood your question. Thanks.

David J

cphongsavath
Regular Participant

 Hi David,


Thanks for replying back,  


The root application is a cfm file and the one that is included in the package is a .cfc file.  If i copy the variables from the  .cfc file to the .cfm file, can the contacts.cfc extend the root application.cfm file?

ChrisJ385
Participant

David where did you go? You didn't answer the follow up question and I have the save one.

Hi,

 

Sorry for the delayed response.  Application.cfc *should be* overriding Application.cfm.  However, since that doesn't appear to be happening for you, you should be able to replace the contents of Application.cfm with the contents of Application.cfc and have it work properly.

 

I wouldn't recommend keeping both of the files in the project, since it can produce strange or mixed results.  I would try taking out Application.cfm to begin with, but if that doesn't work, refer to my advice above.

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

View API documentation, code samples, get your API key.

Visit Page