Highlighted

COLDFUSION MAPPINGS

Participant ,
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>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

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\";

Views

878

Likes

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

COLDFUSION MAPPINGS

Participant ,
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>

Adobe Community Professional
Correct answer by BKBK | Adobe Community Professional

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\";

Views

879

Likes

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
Aug 09, 2018 0
Adobe Community Professional ,
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\";

Likes

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
Reply
Loading...
Aug 11, 2018 0
Participant ,
Aug 13, 2018

Copy link to clipboard

Copied

As always, Thank you

Likes

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
Reply
Loading...
Aug 13, 2018 0