Help with Lucee configuration parameter server.coldfusion.rootdir

OS: Red Hat Linux 3.10.0-1160.53.1.el7.x86_64
Java Version: 1.8.0_322-b06
Tomcat Version: 8.5.35
Lucee Version:

Hoping someone can help with this:

Running an extensive suite of CFML apps (ColdFusion → Railo → Lucee). The server is administered by Sys Admins in a separate organization from mine. I no longer have access to Admin panel.

There has been some personnel churn in the Sys Admin Group, and the person(s) who originally configured the server are no longer available and didn’t document anything. The remaining sys admins are very willing to help, but don’t know anything about Lucee.

Here’s my actual problem: there is a parameter called “server.coldfusion.rootdir” (exposed by dumping the server structure) that is mis-configured. It doesn’t seem to be affecting much because Lucee seems to be running just fine even though this has the wrong server name. However, I have a piece of legacy code that uses this parameter to determine the server document root address. I watched over their shoulder as the sys admins tried to find this parameter in the Admin console, but without success. They have also performed extensive grep searches trying to find the erroneous string in a configuration file somewhere, also without success.

So my question is: can anyone tell me where to find the “server.coldfusion.rootdir” so that we can correct it?

Thanks in advance!

This is really only provided in the server scope for backwards compat with Adobe CF. If you look in the Lucee source code, you can see it is set here:

Which comes from the WEB config’s root directory setting. The ConigWebImpl sets the root dir when it’s created to more/less whatever it gets back from


which is the servlet container’s root path for the WAR (wherever the WEB-INF). Or, depending on your setup, may be where the web root is located. So lucee doesn’t store this anywhere-- it asks your servlet container (such as Tomcat) for it at runtime. This will boil down most likely to how Lucee was deployed on your Servlet. Can you provide

  • How lucee is installed (installer, WAR deploy, CommandBox, etc)
  • What the rootpath is showing you
  • What you are expecting it to show you
  • What Lucee web context you’re hitting. You find get more info on this by visiting the Web admin at /lucee/admin/web.cfm and note the root path is likely different per web context

Maybe then we can figure out what’s different.

Hello @mtilley
grep isnt the best way to find something on a Linux based system. You want to use awk, which is far better at handling ‘.’ characters.

as root, at the base of the file system run

ack 'server.coldfusion.rootdir'

you can also use awk to ignore case
awk 'BEGIN{IGNORECASE=1} ‘server.coldfusion.rootdir’

if you are going to use grep, then use it with the ignore case flag and do not look for dots, it has issues depending on your version of grep
grep -i "server" /
that will search for everything with the word ‘server’, ignoring case.

Thanks Brad! I got some answers to your questions, and some more questions. I tried to respond by e-mail (my organization is sensitive to having information posted in public places) but when I replied to the notification e-mail I received a non-delivery notice. The same thing happened when I tried (what I think is) the reply-to address. Can you let me know an e-mail address I can use to reply to you?

Thanks, Terry - it turns out that searching isn’t going to reveal the answer to this because it’s not actually in a Lucee configuration file of any sort.

Is it possible to just provide a cleaned version of the information. i.e. C:/my/path/to/webroot/, etc? This seems like a valuable conversation to continue having publicly for the community record.

Here’s what I got from the sys admins:

• We are running version – Lucee
• How lucee is installed (installer, WAR deploy, CommandBox, etc) - not sure - it was deployed prior to my supporting the application
• What the rootpath is showing you – see below:
Configuration File /var/www/fsb.mydomain/htdocs/WEB-INF/lucee/lucee-web.xml.cfm
Webroot /var/www/fsb.mydomain/htdocs

And what I’m seeing in server.coldfusion.rootdir is:


Interesting-- so if I’m seeing this correctly, the web context is in the folder with “fsb” in the name, but the root dir has the folder with fsse in the name?

Can you conform again that the test page where you’re seeing fsse.mydomain is for sure the same web context as the web admin where you see the config file in the fsb folder? That’s usually driven off the host.

Hmm, that’s too bad as it’s probably one of the most important questions. Minimally, can you determine:

  • If Lucee is deployed on Tomcat?
  • Is it deployed as a war or as a common-jar installation? The installer is the most likely scenario as it does the latter. You can tell based on where on your disk the lucee.jar is located. Based on the fact you have a WEB-INF in your web roots, I’d also guess it’s a common-jar installation.
  • How are your contexts defined in Tomcat? Did someone edit the server.xml file and add additional hosts or are you using mod_cfml to generate them on the fly. This is very important as it controls where the web root is defined.
  • If you look in your server admin, can you see if there is more than one web context defined, and if so, is there one with a web root in /var/www/fsse.mydomain/htdocs? If so, I’d assume that the web context that is processing your request is not what you think it is.

Also, some additional debugging steps you can take. On the SAME page where you are dumping out server.coldfusion.rootdir, also dump out these

// What does Lucee say the web root is
writeDump( expandPath( '/' ) )

// What does the servlet context say the web root is
writeDump( getPageContext().getRequest().getServletContext().getRealPath('/') )

// What does the Lucee web config say the root dir is
writeDump( getPageContext().getConfig().getRootDirectory().toString() )

// Where does the current lucee web context live
writeDump( getPageContext().getConfig().getConfigServerDir().toString() )

Those should help at least look for any red flags if you’re not hitting the web context that you’ve been thinking you were hitting. But the most important bit is really that 3rd bullet above. That web root from your servlet container is, from my understanding, the king pin of where the root dir comes from.

1 Like

I can confirm that Lucee is deployed on Tomcat. As to the rest, I’ll write something to get the other answers, but I’ll need the sys admins to deploy it to the production server and they’re gone until tomorrow.

By the way, I remember when I had access to this stuff back when we ran Railo, there was an admin panel for each “host” but there was also a higher level panel that showed multiple hosts. I think that’s what you mean by “server admin”? The sys admins can reach the host-level panel but they don’t seem to know how to reach the server-level panel. I had an old bookmark to the Railo server-level panel but all of our attempts to get to the Lucee equivalent failed.


Yes, that;s what I meant.

There is a “server” admin that’s global to the entire server and each web context has its own “web” admin. The server admin can be accessed on any domain as


The web admin is accessed via


and you’ll get whatever web context is specific to the domain you’re using to access it.

Thanks - I’ll pass that along!


Sorry to leave this hanging - just got back from vacation.

I wish I could tell you we figured this out (it might be useful to someone else) but we didn’t. In the end it became apparent that, apart from me, no-one in my organization has the motivation to spend enough time on this to get to the bottom of it. I needed to move on, so in the end I stopped using that incorrect parameter. All of the debugs you asked for provided good information, and I re-coded to use one of them. Thanks to all of you for being willing to help.

1 Like