• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

COLDFUSION MAPPINGS

Participant ,
Aug 09, 2018 Aug 09, 2018

Copy link to clipboard

Copied

I have these mappings setup in my cfadmin for a PROD version of a website. They work fine

mappings.PNG

Now I am going to create another site on the same CF2018 server, an almost mirror copy of this PROD site, but it will be a TEST version, named, GenCORP-TEST

I understand I am going to need to do mappings like I did for my PROD site.

I understand I'll need to use this.mappings for both the PROD and TEST versions of the site.

And I will need to remove these existing mappings.

I understand that the code goes into the application.cfc

How would I code a few of these mapping rows from above in PROD and TEST?

and then would it start like this in the application.cfc

<cfcomponent>

  <cfscript>

    THIS.name = "myName";

    {etc.}

    THIS.mappings = StructNew();

    Then what??

  </cfscript>

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 11, 2018 Aug 11, 2018

this.mappings = structNew();

this.mappings["/app/assets"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\assets\";

this.mappings["/app/assets/stylesheets"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\assets\stylesheets\";

...

...

this.mappings["/app/views/reports/cvh"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\views\reports\cvh\";

Votes

Translate

Translate
Community Expert ,
Aug 11, 2018 Aug 11, 2018

Copy link to clipboard

Copied

this.mappings = structNew();

this.mappings["/app/assets"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\assets\";

this.mappings["/app/assets/stylesheets"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\assets\stylesheets\";

...

...

this.mappings["/app/views/reports/cvh"] = "C:\ColdFusion2018\cfusion\wwwroot\GenCORP-PROD\app\views\reports\cvh\";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 13, 2018 Aug 13, 2018

Copy link to clipboard

Copied

LATEST

As always, Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation