Skip to main content
Participating Frequently
Nov 15, 2012 6:45 PM UTC
Question

Images from outside wwwroot not displaying (despite mapping)

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 is closed to new replies. Start a new post to keep the conversation going.

3 replies

Inspiring
Nov 15, 2012 7:33 PM UTC

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

--

Adam

Translate
Participating Frequently
Nov 15, 2012 8:04 PM UTC

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?

Translate
BKBK
Community Expert
Community Expert
Nov 19, 2012 4:36 PM UTC

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

Translate