private Container getHost() { // get engine Container container = service.getContainer(); if (container == null) throw new IllegalStateException("The Tomcat server doesn't have any Engines defined"); // now get host Container[] children = container.findChildren(); if (ObjectUtils.isEmpty(children)) throw new IllegalStateException("The Tomcat server doesn't have any Hosts defined"); // pick the first one and associate the context with it return children[0]; }
private Container getHost() { // get engine Container container = service.getContainer(); if (container == null) throw new IllegalStateException("The Tomcat server doesn't have any Engines defined"); // now get host Container[] children = container.findChildren(); if (ObjectUtils.isEmpty(children)) throw new IllegalStateException("The Tomcat server doesn't have any Hosts defined"); // pick the first one and associate the context with it return children[0]; }
protected Context getContext(final String contextPath) { final Host host = (Host) container.getContainer().findChildren()[0]; final Context context = host.map(contextPath); return context; }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Add this mapper to the container and all child containers * * @param container */ private void addListeners(Container container) { container.addContainerListener(this); container.addLifecycleListener(this); for (Container child : container.findChildren()) { addListeners(child); } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
/** * Remove this mapper from the container and all child containers * * @param container */ private void removeListeners(Container container) { container.removeContainerListener(this); container.removeLifecycleListener(this); for (Container child : container.findChildren()) { removeListeners(child); } } }
private void deployWebApp(final Context app) { TomcatHelper.getServer().findServices()[0].getContainer().findChildren()[0].addChild(app); }