[ CB 1.5.6 ] Subfolder installation help

Hi there guys,

I have a question since just dropping contentbox into a folder just didn’t work for me :frowning: yet

I need something like this:



Site will contain contentbox structure:



When I first run the installer, all seem normal, I enter my datasource name, the installer created the database tables (empty) but that was it. then:

HTTP Status 404 - /site_running_contentbox_1/index.cfm/cbInstaller

I restarted servers, but same thing…

CFML Engine:
Railo final

The reason is that Im planning to develop a few sites using contentbox, and I need some people being in Spain to see them. My ideas was to use a one domain to develop this sites, and then when done, move them to their original domain.

Any ideas?

Thank you guys

Felipe Serrano

I think I found a workaround…

I move all out from the subfolder to the root just to make sure my issue wasn’t related to that, run the installer… all went ok, then move back all again into the the subfolder I was expecting the installation process to start again but no, the site and the admin kept intact from my root installation. I guess this is because the app name kept the same.

You have a coldbox folder inside each site? Did you create a mapping for coldbox since the coldbox folder isn’t in the web root.

And to clarify, the 404 says that there is no index.cfm file in the site_running_contentbox_1 directory? Does that file exist?



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I just tried it and got the same issue. Them I remembered-- SES urls don’t work automatically with railo when your app is in a subdirectory. The issue is with the servlet mapping URL pattern in web.xml.

In Adobe CF, it’s
but in Tomcat (and Jetty) it’s

The problem is you’re only allowed one wildcard. So your file name has to be index.cfm and it has to be in the root. Well, it doesn’t have to be-- that’s just the default. If you want to use a different filename OR use SES in a subdirectory, you’ll need to add an additional mapping pattern for each URL pattern that needs to be matched.

Open your web.xml, which on my machine is \tomcat\conf\web.xml and search for this block:

GlobalCFMLServlet /index.cfm/*

And add additional url-patterns in like so:



Then restart Railo. It may vary a bit based on servlet container, but that’s the gist. Perhaps we should put in a check and if the user is on Railo and installing into a subdirectory we warn them that SES urls won’t work by default which are required for the installer. Feel free to enter a ticket for that enhancement.



ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Good Knowledge to keep in mind.

Thank you Brad!

All worked.

fond the following in my web.xml I had to uncomment

CfmServlet *.cfml/* CfmServlet *.cfm/* CFCServlet *.cfc/*

Does Webshpere support double wildcards servlet mappings? I didn’t think it did and you mentioned you were on Webshpere I thought.

yes sorry I should mention for other users who stumble upon this that I am on cf2016, Oracle 12c, websphere and I have installed contentbox in a sub folder called cbapp things I have tried thus far are the following

I found my web.xml file in ear/.war/WEB-INF/web.xml

(Attempt 1)

  • I tried uncommenting the section:

If your J2EE server supports it, you can uncomment these.
They are included to support Search Engine Safe (SES) URL types.
Some servers (Tomcat, SunONE) don’t support wildcard mappings

-saved the file
-restarted server
(result 1)
-404 error
-same url /cbapp/index.cfm/cbInstaller
-confirmed that websphere does not support double wild cards

(attempt 2)
-recommented the previous section
-found the following section

CfmServlet *.cfm

-modified to

CfmServlet *.cfm /cbapp/index.cfm/*

-saved the file
-restarted the server
(result 2)
-404 error
-same url /cbapp/index.cfm/cbInstaller

(attempt 3)

  • modified /cbapp/index.cfm/ to
    (removed leading slash)

-saved the file
-restarted server

(result 3)
-404 error
-same url /cbapp/index.cfm/cbInstaller

I figured out why all websphere users should refer to the following

this is very unfortunate if I find a work around I will post it here but long story short the web.xml file gets ignored unless you redeploy the entire app