In Host Manager there is a file "manager.xml". It is used to configure an copy of Manager webapp when a new virtual host is created via Host Manager. As time goes, it became different from a META-INF/context.xml file of a real Manager application. E.g. the following commit added a CookieProcessor configuration to the Manager web application, but "manager.xml" file has not been updated. https://github.com/apache/tomcat/commit/3405dec9efb027252ddba005d6e44dda4c9f43df
Would it make sense to copy webapps/manager/META-INF/context.xml to webapps/host-manager/manager.xml as part of the build script (i.e. in build.xml)?
(In reply to Igal Sapir from comment #1) > Would it make sense to copy webapps/manager/META-INF/context.xml to > webapps/host-manager/manager.xml as part of the build script (i.e. in > build.xml)? That is a good idea, but note the differences: - An attribute docBase="${catalina.home}/webapps/manager" - A comment at the top. Both can be inserted while copying. https://ant.apache.org/manual-1.9.x/Types/filterchain.html#replaceregex https://ant.apache.org/manual-1.9.x/Tasks/copy.html I wonder whether there can be a better name for this file, to clarify its purpose. E.g. "manager-template.xml". Though that is a separate issue.
Please see https://github.com/apache/tomcat/commit/04c7bf00144e38c7b1128e4bb5fed310a1ccfec8 I like the idea of renaming to "manager-template.xml"m as well as your answer to my question, but only saw your comment now. I'd be happy to make changes as needed.
Ported to 9.0.x, 8.5.x, and 7.0.x