Skip to main content
Inspiring
January 17, 2020
Answered

Coldfusion only displays coldfusion files

  • January 17, 2020
  • 1 reply
  • 1244 views

I have installed Coldfusion 2018 in developer mode using the built in web server. It will serve up any coldfusion file (*.cfm) but nothing else. Even if the file is in the same direcotry. No *.html, *.jpg, *.png, nothing. 

At first I thought it was a permission issue because I had to alter the user the coldfusion service is running under. But since it still won't display files in the same directory as the *.cfm files it is displaying I am doubting that assumption.

Does anyone have an idea why this might be happening?

This topic has been closed for replies.
Correct answer Dave Watts

Uh, is Coldfusion case sensitive with folders/filenames? It wasn't on version 8. But if I manually type in the filename I am trying to load up, with the same case as is in windows explorer, in the URL bar of the brownser, I can pull up the files.

 

I just renamed the subfolder containing this web application (from CalamityLog_dev to calamitylog_dev) and now everything works?!?  Surely that isn't how it's supposed to be.

 

EDIT:

Evidently that is the way it is 😞

https://community.adobe.com/t5/coldfusion/coldfusion-10-case-sensitive-urls/td-p/4170542


Yes, it is! I didn't think to mention that, because of my long-standing internal rule that I treat EVERYTHING as case-sensitive whether it is or not. So I simply didn't think to suggest that! You can probably make it case-insensitive by fiddling around in one of the Tomcat configuration files. I'd search for "tomcat disable case sensitive url" or something along those lines. Sorry!

 

Dave Watts, Eidolon LLC

1 reply

Community Expert
January 17, 2020

This is kind of weird (meaning I don't have this problem, I guess). What happens when you request one of the files? Do they show up in a directory listing? Are the files located in the default CF webroot (C:\ColdFusion2018\cfusion\wwwroot)? For that matter, are you running on Windows or something else?

 

Dave Watts, Eidolon LLC

Dave Watts, Eidolon LLC
Inspiring
January 17, 2020

I am running on Windows. If I request the file I get a 404 error. If I request a CFM file in the same directory it comes up fine. They are all in subdirectory of the default root directory that you mentioned above. 

 

After reading your response I tried something else that makes it more strange. If I put a file directly in the root (C:\ColdFusion2018\cfusion\wwwroot\image.png for example), it loads up fine. If I put it in a subdirectory (C:\ColdFusion2018\cfusion\wwwroot\subdirectory), it won't load. Any CFM file will load from that subdirectory though.

 

Charlie Arehart
Community Expert
Community Expert
January 18, 2020

Yes, it is! I didn't think to mention that, because of my long-standing internal rule that I treat EVERYTHING as case-sensitive whether it is or not. So I simply didn't think to suggest that! You can probably make it case-insensitive by fiddling around in one of the Tomcat configuration files. I'd search for "tomcat disable case sensitive url" or something along those lines. Sorry!

 

Dave Watts, Eidolon LLC


What you'll find if you look for that is all kinds of warnings that doing that is unsafe. It's because Tomcat has built-in protections to NOT serve what's in the wwwroot/WEB-INF folder (the one under the cfusion folder), and since the case sensitivity is server-wide (within Tomcat, I mean), then doing such opens the door to obtaining files in there "over the web".

Of course, the OP here may say they are "only doing development locally", so they may choose to ignore the warning.

 

But then a question is: why use the built-in web server? Were you doing that in CF8. You probably had IIS in front of CF then, and you can do the same now.

 

You'd be forgiven for not noticing it was readily possible, though. Sadly, the CF2018 installer no longer offers to do IIS (or Apache) integration--even if you DO have them installed--like it used to. But you can run the CF "web server configuration tool", whose interface has hardly changed since CF8 days. It's in the cfusion/runtime/bin folder, but also should be on your Windows Start menu, under Adobe.

 

That then will NOT be case-sensitive. The change since CF8 days is that CF10 changed to running on Tomcat (CF6-9 ran on JRun instead), and when you use the built-in web server (port 8500, with code in the cfusion/wwwroot), that is executed by the Tomcat internal web server, which IS (by default) case-sensitive.

/Charlie (troubleshooter, carehart. org)