Once in a while I get questions about whether Apache Tomcat implements a way to include other files in server.xml, Tomcat’s main configuration file. The answer is that there is a way to do it, and that Tomcat didn’t have to implement a new feature for it to work. The way to do it is: XML entity includes.
XML is a featureful and flexible data file format, and one thing that makes it helpful is that the XML parsers can be generic (think non-custom code), and because they can be generic, many different software projects can use the same parser code. If the parser code can be shared, then all the features added to the parser can be available to all of the software projects that use the parser. A great example of this is: it is common for us to want to include an additional file into a configuration file, so someone along the way added entity includes to the XML standard, then the XML parsers implemented it. Tomcat got it “for free”.
Getting started Community Training Tutorials Documentation APIs, AI & Tools



