Copy link to clipboard
Copied
I just installed ColdFusion 2018 Developer Edition on my Windows 10 laptop and configured it to use the built-in web server. Previously I was using ColdFusion 10.
Now I have a case-sensitivity problem. For example, all css and js references are now case-sensitive, whereas they weren't when I was using ColdFusion 10. The same is true for calls to images and plain html files.
I modified the context.xml file (in the /cfusion/runtime/conf folder) to include <Context AllowLinking="true" caseSensitive="true">
(and yes, I also tried caseSensitive="false") and have restarted several times, but no luck yet.
The 404 error messages specify Apache Tomcat.
Any ideas on how to restore case-insensitivity? Thanks in advance for any help.
Copy link to clipboard
Copied
The built-in web server uses Apache Tomcat. If you're trying to avoid case sensitivity, you can simply connect your CF server to IIS using the Web Server Configuration Tool. In the long term, I would recommend that you treat everything as case sensitive so that you can deploy it on any platform. It's also a good practice to follow in that most languages and platforms are case sensitive anyway.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Dave - the CF developers previously provided a solution for this. Pragati - I have the same issue and the previous resolutions did not resolve it - in fact, changing the context tag completely disabled my localhost. The thing is - so many objects and files are affected because production environment does not look at the case. Can we please add a resolution for this. I think a major percentage of people have development environments. I actually can't believe this issue still exists now for a few versions.
Copy link to clipboard
Copied
forgot to mention - the image's relevance is that the directory is named BHHS_responsive
Copy link to clipboard
Copied
Folks, I don't find this to be happening: not on CF2018, or 2016, or 11, or 10. I tested them all tonight. they were not case-sensitive with respect to the filename or folder name, and yes, this is with the built-in web server in CF. And yes, this is on Windows.
I would wonder if there is something that you may have done on your end to experience this. Here is a screenshot showing that it's working for me, on CF2018 (and yes, this is on the Developer edition, but I also confirmed it on Standard):
So when you wonder why more people haven't reported this "obvious problem", it would seem that the problem is not quite as universal as you are asserting. That said, I am certainly interested to figure out how we may be seeing different results.
Let us know what you think. (And for you two who are reporting seeing the problem, are you seeing it in more than one implementation of CF2018? That may be helpful for you to confirm, if you can.)
Copy link to clipboard
Copied
Charlie - I want to thank you for your reply. ... and also wanted to mention that it has been reported a bunch of times - if you Google 'case sensitivity in ColdFusion' You will find things dating back to CF 10. Here's a link to a thread on that one... Coldfusion 10 Case Sensitive URLs?!? . I'm not doing anything unusual. Very basic install / self contained server. Most of my settings were the default.
Again - thanks for even looking. Not sure what other info I can provide other than it has been a known issue since 2012.
Copy link to clipboard
Copied
I just downloaded and installed CF2018 Dev to run on the IP address port 8500 and I am having the case sensitivity issue as well. I am running on a VM too, IIS does not like the VMShare between the host and the VM so the port is better solution. If anyone has any suggestions OTHER THAN use IIS, I am all ears. I have dropped case on all my code and that is working for now but having to update all source cause of case is no fun for anyone.
Copy link to clipboard
Copied
I'm really confused here. Are you trying to run IIS on the host OS and CF on the guest OS? If so, what is the OS you're using for the guest? Can you install CF on the host OS? If so, I think that would solve your problem.
I can tell you, like Charlie did earlier in the thread, that CF is not case-sensitive on Windows. I thought it might be possible that CF 2018 was case-sensitive if you used the built-in web server, but I've tested this on Windows 10 with the built-in web server and this is not true for me.
Dave Watts, Eidolon LLC
Copy link to clipboard
Copied
Dave, sorry I was not as focused as I should have been.
I am running CF2018 on a Windows VM that is Win10. The VM is ORACLE VM VirtualBox.
I cannot run IIS on VM VirtualBox because I want to run a VM share between the Host computer and the VM, I wanted to mention that only so IIS was not suggested as a solution but that will not work in my situation.
I can not install anything on the Host, only on the VM. No permissions to install anything on Host machine.
So in my case, I am running on CF 2018 on the built-in web server and it is being Case-Sensitive. I run a script and dropped the case on all files and folders and then updated the Ancor Tags to match and site worked as expected. Very strange, but I cannot go through the 25,000 files to drop case on links in the app just to run in DEV machine VM. Might piss off a few people plus take too much time.
I am going to look into the <Context> solution on the newer version of Tomcat within CF2018 and see if the syntax is different, but I have tried the modified the context.xml file (in the /cfusion/runtime/conf folder) to include <Context AllowLinking="true" caseSensitive="true">
and no change in behavior was seen.
Thank you for your follow up questions. I hope I have addressed them and any suggestion is welcome.
Matt
Copy link to clipboard
Copied
SO Tomcat 9 (which is what CF2018 is "shipped" with) from the Apache documentation
allowLinking attribute description:
If the value of this flag is true
, symlinks will be allowed inside the web application, pointing to resources inside or outside the web application base path. If not specified, the default value of the flag is false
.
NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.
Per Apache Tomcat 9 Configuration Reference (9.0.22) - The Resources Component
<Context>
...
<Resources allowLinking="true" />
...
Is then causing CF2018 to be case sensitive, BUT will not allow my Context in the server.xml pointing to more than one web root does not work and make Windows case sensitive. So I will continue with the <Resources allowLinking="false" /> OR removed. But in Tomcat 9 the attribute of caseSensitive="true" does not exist.
Just wanted to share this and see if this sparks more input.
Copy link to clipboard
Copied
For those that tested, please note that the problem is reproducible with images (try using .JPG vs .jpg) as shown in the referenced post. We had the same problem, but ended up making sure the case matched exactly for all of our image references, due to security concerns.
From Coldfusion 10 Case Sensitive URLs?!? :
NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.
If you still want to set it, did you try the final suggestion as shown in the referenced post of not using caseSensitive at all?
<Context>
...
<Resources allowLinking="true" />
...
And just FYI, caseSensitive="true" (as seen in the solution for older versions) is not missing/necessary, i.e., <Resources allowLinking="true" caseSensitive="true" /> does not appear to have any effect
Copy link to clipboard
Copied
So did we ever finalize on a solution for case sensitivity using the built in web server for CF Develoepr install? Here I am in 2024 using CF2023 and I'm right back to where I was years ago with a whole bunch of broken images and style sheets. I'm woking on a client's web site that is hosted on a Windows server but I am on a Mac using the Apache Tomcat built in server.
I am not in a public space so I am not terrible worried about security issues with changing stuff in server.xml or context.xml if it will make the site not case sensitive.
Will this do anything? <Context AllowLinking="true" or maybe <Resources allowLinking="true" /> Or are we just out of luck unless we want to use IIS which will be a huge PITA for me on a Mac! :^)
Copy link to clipboard
Copied
No solution I'm aware of...but also not a cf bug. Cf is not case-sensitive. But the built-in tomcat web server is, which CF includes (for use primarily for the cf admin) and which you may be running against.
And that windows server is probably using IIS--rather than the built-in cf/tomcat web server. Of course you can't use that on a Mac (except on parallels or another windows VM).
But you could run Apache on a Mac. You might even find it already installed. And you can connect it to cf using the CF web server configuration tool (documented by Adobe and discussed many places on the web. And you could also try using the apache proxypass directive to forward to that Cf/tomcat web server but you may still experience case issues.)
Using apache is for most folks barely more work to setup than using the Tomcat web server. It's just not always obvious whether it will help.
Let us know if it does help here.