Orig title: Include the mappings set in the servlet engine, when resolving file paths
Being part of the mod_cfml team, I added some code to mod_cfml (github link), which copies the mappings set in the frontend server, to the backend Tomcat server, to make them available for Lucee / other cfml engines.
Unfortunately, Lucee does not currently notice these extra mappings, when resolving file paths.
Apache Tomcat has the option of adding extra resource paths to a web context. These are named "aliases" in tomcat 7, and "web resources" in tomcat 8. In Apache httpd server, they are called "aliases", and "virtual directories" in IIS.
As an example, imagine a website site1.com, with the root path /web/site1/webroot/, and extra resources at site1.com/shared/, which are on disk at /web/shared/
The website would then be configured in Tomcat 8 like this:
Tomcat does see the resources, as can be tested from a cfml page with the following code:
The cfdump would return /web/shared/.
Lucee, on the other hand, would display /web/site1/webroot/shared/ when trying to access /shared/.
My enhancement request is, to have Lucee use the mappings in the servlet context.
Maybe this can be done by actualy copying the defined mappings from the servlet context?
Otherwise, checking the result of getPageContext().getServletContext().getRealPath( realPath ) should work. I made a non-working sketch-up of how I see this here: https://github.com/paulklinkenberg/Lucee/commit/cabeaf85cff38cc55901489057d88e12d7c610b9
btw: this feature would make the mod_cfml connector equal to the ACF "magic" connector