OK, I appreciate the help and understand your frustration so I am thinking I’ll just soldier on as we are and try to figure this one out myself so you may help others. As I will no doubt come back and search this thread again, like I did this week, I will lay out (for mine and anyone else reference) everything I know/currently understand about this issue.
Environment
My test/dev environment is Windows Server 2012 / IIS 8, Lucee 5.2.9.31 (updated today), 3 IIS Sites vm-01.localhost, vm-02.localhost, vm-03.localhost. One single mapped resource for global includes. All IIS site directories are empty except for a single index.cfm that references a file via
<cfinclude template="/global-includes/date.cfm">
that mapped file is located here c:\lucee\mapped-resource\date.cfm
init-param setting C:/lucee/web-contexts-global
I did uncomment the init-param and enter exactly as Brad had suggested per my post above
If I omit the `{web-context-label}` then basically an error is thrown and the WEB-INF directory is created locally in the site httpd directory.
This, in an unclear way, says I did first try saving the init-param block as
<init-param>
<param-name>lucee-web-directory</param-name>
<param-value>C:/lucee/web-contexts-global</param-value>
<description>Lucee Web Directory (for Website-specific configurations, settings, and libraries)</description>
</init-param>
As also shown here as direct screenshot from c:\lucee\tomcat\conf\web.xml
The result of this setting is as follows
C:\lucee\web-contexts-global
Went from being empty to populating with all the “WEB-INF” directories also and a separate web context directory for ROOT
Lucee Admin showing the web contexts now available
C:\sites\vm-01.localhost
Went from being an empty directory to now having a WEB-INF (local directory)
With the contents of this WEB-INF directory containing a local copy of the compiled “mapped resources” file as shown below
as well as all the same directories present essentially if I had made no change to the root web.xml
init-param setting C:/lucee/web-contexts-global/{web-context-label}
When I change setting to what I noted in my previous post the results change to
C:\sites\vm-01.localhost\WEB-INF\lucee
C:\lucee\web-contexts-global
Lucee Admin Web Contexts
Summary
-
Without a placeholder nothing really changes too much except more duplication (web context is created local to the site as well as in the global web contexts directory
-
With a placeholder to the same global web contexts directory duplicate copies of all WEB-INF diretcories to the local site is NOT made however in it’s place a web context directory is created in the global web contexts parent directory for this site with a cfclasses folder containing a compiled version of the mapped resources files called.
-
Thus no reduction the number of files generated was achieved via either setting change, just the location and placement of the files.
-
The goal was to achieve non-duplication of “Mapped directories” as in a larger virtual hosted environment this leads to serious performance issues in generating and re-generating all these files for every site on every file change. The only quasi solution I found was to set the Inspect property of the Mapped directory to “Never” and restart Lucee late at night to propagate any changes to all sites. This seems to work as follows, when a change is made to files in the C:\lucee\mapped-resources directory, if a site has not accessed this file at all during the current server lifetime it will see the latest change. If a site has accessed this file previously it will not the the latest change until a service restart.