On 23/01/2010 04:31, Aryeh M. Friedman wrote:
I have an Java based XML DB that keeps track of different configurations for various sites we host and it is trivial to have it spit out a <Host> entery compatible with server.xml for each site... the only problem we have is how to insert the output into server.xml without garbaging and/or having to parse the file... the solution I want to use is "include file X here" but I can not find any way of coding that into server.xml.... If it is compatible with standard XML inclusion tag's just let me know and I will figure out the rest if not is there a special tag or something?
It is undocumented but you can use a standard form of XML include by defining an entity and then referencing it.
Add a doctype before the Server element as below. p <!DOCTYPE Server [ <!ENTITY IncludedHosts SYSTEM "server-hosts.xml"> ]> <Server port="8005" shutdown="SHUTDOWN"> // etc ... <Service name="Catalina"> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <Engine name="Catalina" defaultHost="pidster.com"> &IncludedHosts; </Engine> </Service> </Server>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org