Rob,
On 12/2/20 13:31, Rob Sargent wrote:
I'm old and easily confused: does an embedded tomcat server read (any)
context.xml file? I find conflicting answers /out there./
Using tomcat 9.0.40
embeddedTomcat =new Tomcat();
embeddedTomcat.setPort(tomcatPort);
embeddedTomcat.enableNaming();
embeddedTomcat.getConnector();// an init, really String
contextRootPath =System.getenv("CATALINA_HOME");
Context contextTomcat =embeddedTomcat.addContext("",new
File(contextRootPath +"/sgs").getAbsolutePath());
I know it is finding WEB-INF/web.xml (under "sgs") and finds all my
servlets, none of which are named in the web.xml.
Tomcat should be reading your web application's META-INF/context.xml
file, if one exists.
If you call Tomcat.init(), it will attempt to locate the default
conf/server.xml, conf/web.xml, and conf/context.xml based upon your
configuration source.
What are you /really/ asking?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org