MCPcopy Create free account
hub / github.com/apache/tomcat / setHost

Method setHost

java/org/apache/catalina/startup/Tomcat.java:556–568  ·  view source on GitHub ↗

Sets the current host - all future webapps will be added to this host. When tomcat starts, the host will be the default host. @param host The current host

(Host host)

Source from the content-addressed store, hash-verified

554 * @param host The current host
555 */
556 public void setHost(Host host) {
557 Engine engine = getEngine();
558 boolean found = false;
559 for (Container engineHost : engine.findChildren()) {
560 if (engineHost == host) {
561 found = true;
562 break;
563 }
564 }
565 if (!found) {
566 engine.addChild(host);
567 }
568 }
569
570 /**
571 * Returns the default Host for this embedded Tomcat instance.

Callers 9

doTestInvalidateMethod · 0.45
mainMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
setUpMethod · 0.45
testListenerMethod · 0.45

Calls 3

getEngineMethod · 0.95
findChildrenMethod · 0.65
addChildMethod · 0.65

Tested by 9

doTestInvalidateMethod · 0.36
mainMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
setUpMethod · 0.36
testListenerMethod · 0.36