ctx.addLifecycleListener(ctxCfg); host.addChild(ctx);
public static StandardContext createContext() { final StandardEngine engine = new StandardEngine(); engine.setService( new StandardService() ); final StandardContext context = new StandardContext(); context.setPath( "/" ); context.setSessionCookiePath( "/" ); final WebappLoader webappLoader = new WebappLoader() { @Override public ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } }; context.setLoader( webappLoader ); final StandardHost host = new StandardHost(); engine.addChild( host ); host.addChild( context ); return context; }
context.setConfigFile(this.overrideConfigFile); host.fireContainerEvent(PRE_INSTALL_EVENT, context); host.addChild(child); host.fireContainerEvent(INSTALL_EVENT, context);
host.addChild(context); host.fireContainerEvent(INSTALL_EVENT, context);
host.addChild(context); host.fireContainerEvent(INSTALL_EVENT, context); } catch (ClassNotFoundException e) {
final TomEERemoteWebapp child = new TomEERemoteWebapp(); if (!hasChild(standardHost, child.getName())) { standardHost.addChild(child);