Tomcat 7: Include virtual host definitions from a directory?

Posted by grog_7 on Server Fault See other posts from Server Fault or by grog_7
Published on 2012-12-04T22:06:43Z Indexed on 2012/12/04 23:06 UTC
Read the original article Hit count: 106

Filed under:

I'm setting up a new Tomcat 7.0.33 server, and I'm looking for a simple way to include a directory full of virtual host definition XML files for configuration.

I've found that it's possible to do XML includes from server.xml, but this requires a line in server.xml for each file, and is no less work than just having the entire config right in server.xml. I'm looking for something similar to Apache's Include directive.

The end result I'm looking for is to have a directory I can drop an XML file into that Tomcat will pick up on the next restart, without having to modify server.xml. Is there a way to do this?

Thanks!

© Server Fault or respective owner

Related posts about tomcat