Skip to main content
Participating Frequently
November 15, 2012
Question

Images from outside wwwroot not displaying (despite mapping)

  • November 15, 2012
  • 1 reply
  • 1299 views

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

This topic has been closed for replies.

1 reply

Inspiring
November 15, 2012

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

--

Adam

Participating Frequently
November 15, 2012

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?

BKBK
Community Expert
Community Expert
November 19, 2012

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