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

Images from outside wwwroot not displaying (despite mapping)

New Here ,
Nov 15, 2012 Nov 15, 2012

Copy link to clipboard

Copied

For security purposes, I keep my site's images outside of wwwroot in this folder: C:\extSite\stdImages\store

Then I created a mapping in wwwroot\WEB-INF\jrun-web.xml like this:

<virtual-mapping>

  <resource-path>/extStdImages</resource-path>

  <system-path>C:\extSite\stdImages\</system-path>

</virtual-mapping>

My store.cfm page has this:  <img src="/extStdImages/store/#photoFilename#" />

The works fine on my dev site, but I just deployed to production where it does not work -- the images don't display.

Can anyone help?  Thanks in advance!

PK

TOPICS
Advanced techniques

Views

1.2K

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 ,
Nov 15, 2012 Nov 15, 2012

Copy link to clipboard

Copied

Whoa, first things first: you're using the JRun web server in production?  It's not a production grade web server.

--

Adam

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
New Here ,
Nov 15, 2012 Nov 15, 2012

Copy link to clipboard

Copied

No.  I'm using IIS in production, and I'm using CF's built-in web server in dev.

Some of the research I've just done hints that maybe I need a virtual directory for my image folder.  Does that sound right?  If so, how would I do this?

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 ,
Nov 19, 2012 Nov 19, 2012

Copy link to clipboard

Copied

LATEST

My guess is that you have repeat the steps of your above virtual mapping, but then in IIS. Use, for example, the IIS Manager.

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