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

Method getEngine

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

Access to the engine, for further customization. @return The engine

()

Source from the content-addressed store, hash-verified

590 * @return The engine
591 */
592 public Engine getEngine() {
593 Service service = getServer().findServices()[0];
594 if (service.getContainer() != null) {
595 return service.getContainer();
596 }
597 Engine engine = new StandardEngine();
598 engine.setName("Tomcat");
599 engine.setDefaultHost(hostname);
600 engine.setRealm(createDefaultRealm());
601 service.setContainer(engine);
602 return engine;
603 }
604
605 /**
606 * Get the server object. You can add listeners and few more customizations. JNDI is disabled by default.

Callers 12

setUpMethod · 0.95
doTestRoleMappingMethod · 0.95
doTestInvalidateMethod · 0.95
testListenerMethod · 0.95
testServletMethod · 0.95
testDeployMethod · 0.95
testBug57700Method · 0.95
setHostMethod · 0.95
getHostMethod · 0.95

Calls 8

getServerMethod · 0.95
getContainerMethod · 0.95
setDefaultHostMethod · 0.95
createDefaultRealmMethod · 0.95
setContainerMethod · 0.95
findServicesMethod · 0.65
setNameMethod · 0.65
setRealmMethod · 0.65

Tested by 10

setUpMethod · 0.76
doTestRoleMappingMethod · 0.76
doTestInvalidateMethod · 0.76
testListenerMethod · 0.76
testServletMethod · 0.76
testDeployMethod · 0.76
testBug57700Method · 0.76