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

Coldfusion2018: How to setup mapping correctly?

Participant ,
Jun 26, 2019 Jun 26, 2019

Copy link to clipboard

Copied

These are the steps I use:

1) I created new mapping inside CF Server => Server Settings => Mapping

logical path: /mysite

directory path: /Volumes/drive2/work/mysite

2) I restarted the server

/Applications/ColdFusion2018/cfusion/bin/coldfusion stop && /Applications/ColdFusion2018/cfusion/bin/coldfusion start

3) Using my preferred text editor, I created test.cfm inside /Volumes/drive2/work/mysite with the following contents

<cfdump var="#CGI#">

4) I then tried viewing the new file on my browser via

localhost:8500/mysite/test.cfm

I then get a 404 error. Exact message goes like "coldfusion.runtime.TemplateNotFoundException: File not found: /mysite/test.cfm"

I checked these 2 things:

  1. I verified that /Volumes/drive2/work/mysite  is readable by everyone (755 permission)
  2. I verified that /Volumes/drive2/work/mysite/test.cfm  is readable by everyone (644 permission)

Other than creating the mapping, the other configurations I've changed are:

  1. Created datasource for my app
  2. Enabled debugging/logging but only after I got the first 404 error

Any ideas what I could be doing wrong? or perhaps other settings I should've set? I've added a screenshot of the mappings section below.

Thanks!

Screen Shot 2019-06-26 at 5.06.03 PM.png

Views

1.0K

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
LEGEND ,
Jun 27, 2019 Jun 27, 2019

Copy link to clipboard

Copied

I can only think of two things.

First, make sure the connector is properly set.  Sometimes it will look successful, but logs can indicate otherwise.

Next, look at this SO thread currently with only one answer.  It might help.

HTH,

^ _ ^

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
Community Expert ,
Jun 27, 2019 Jun 27, 2019

Copy link to clipboard

Copied

LATEST

CF mappings aren't going to let you resolve file paths through the web server, which is what you're trying to do here. They only affect CFML tags that use their own file paths, like CFINCLUDE and CFMODULE. You'll need to create a virtual mapping in your web server. Since you're using the CF built-in web server, you'll need to edit a text file for configuration as described here:

Working with Tomcat as the built-in application server | Adobe Developer Connection

I found that, along with some other useful information, from Charlie Arehart's blog post here:

https://www.carehart.org/blog/client/index.cfm/2012/7/23/The-builtin-web-server-in-ColdFusion-10-ena...

Dave Watts, Eidolon LLC

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