Debian tomcat install: how does tomcat know about xwiki?

I am using the proposed debian APT installation with tomcat, mysql and (now) xwiki 12.10. Everything runs fine unter /xwiki of that server.

I just wonder about the magic that tomcat finds the xwiki web application ( I want to make it the ROOT app). Its not in the usual webapps directory, nor defined in server.xml

I think it’s in the tomcat context file for xwiki: see https://github.com/xwiki/xwiki-platform/blob/d638b6d81ce8129e6f7d57bc4247cb158ae92c30/xwiki-platform-distribution/xwiki-platform-distribution-debian/xwiki-platform-distribution-debian-tomcat/xwiki-platform-distribution-debian-tomcat8-common/src/deb/resources/etc/xwiki/xwiki-tomcat8.xml

thats certainly the right file (in my case tomcat9) - but how does tomcat know about it?

ops, I found it; its copied to /etc/tomcat9/Catalina/localhost/xwiki.xml during install.

Thx anyway

Yep, that’s it. It’s a link to the file indicated by @vmassol. There was an hint on https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HXWikiasrootwebapp28shortURLs29 but I just added it to https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HXWiki to be more clear.