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

Method getServer

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

Get the server object. You can add listeners and few more customizations. JNDI is disabled by default. @return The Server

()

Source from the content-addressed store, hash-verified

608 * @return The Server
609 */
610 public Server getServer() {
611
612 if (server != null) {
613 return server;
614 }
615
616 System.setProperty("catalina.useNaming", "false");
617
618 server = new StandardServer();
619
620 initBaseDir();
621
622 // Set configuration source
623 ConfigFileLoader.setSource(new CatalinaBaseConfigurationSource(new File(basedir), null));
624
625 server.setPort(-1);
626
627 Service service = new StandardService();
628 service.setName("Tomcat");
629 server.addService(service);
630 return server;
631 }
632
633 /**
634 * Adds a new context to the specified host.

Callers 15

testGlobalNamingMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
initOpenSSLMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
testThreadLocalLeak1Method · 0.95
testThreadLocalLeak2Method · 0.95

Calls 6

initBaseDirMethod · 0.95
setSourceMethod · 0.95
setNameMethod · 0.95
setPortMethod · 0.65
addServiceMethod · 0.65
setPropertyMethod · 0.45

Tested by 15

testGlobalNamingMethod · 0.76
setUpMethod · 0.76
setUpMethod · 0.76
setUpMethod · 0.76
initOpenSSLMethod · 0.76
setUpMethod · 0.76
setUpMethod · 0.76
setUpMethod · 0.76
testThreadLocalLeak1Method · 0.76
testThreadLocalLeak2Method · 0.76