Bug 64797

Summary: Align manager.xml template file in Host-Manager with context.xml of real Manager web application.
Product: Tomcat 10 Reporter: Konstantin Kolinko <knst.kolinko>
Component: ManagerAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 10.0.0-M9   
Target Milestone: ------   
Hardware: PC   
OS: All   

Description Konstantin Kolinko 2020-10-10 16:18:25 UTC
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
Comment 1 Igal Sapir 2020-10-10 22:11:23 UTC
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)?
Comment 2 Konstantin Kolinko 2020-10-11 12:16:42 UTC
(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.
Comment 3 Igal Sapir 2020-10-18 19:42:03 UTC
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.
Comment 4 Igal Sapir 2020-10-29 04:06:01 UTC
Ported to 9.0.x, 8.5.x, and 7.0.x