@Override public void start() throws Exception { this.tomcatServer.start(); this.port = this.tomcatServer.getConnector().getLocalPort(); this.context.addLifecycleListener(event -> { if (logger.isDebugEnabled()) { logger.debug("Event: " + event.getType()); } }); }
context.addLifecycleListener((event) -> { if (context.equals(event.getSource()) && Lifecycle.START_EVENT.equals(event.getType())) {
ctx.addLifecycleListener(TomcatUtil.getDefaultWebXmlListener()); ctx.setConfigFile(TomcatUtil.getWebAppConfigFile(ROOT_CONTEXT_PATH, config.docBase())); ctx.addLifecycleListener(ctxCfg);
private void configureSession(Context context) { long sessionTimeout = getSessionTimeoutInMinutes(); context.setSessionTimeout((int) sessionTimeout); Boolean httpOnly = getSession().getCookie().getHttpOnly(); if (httpOnly != null) { context.setUseHttpOnly(httpOnly); } if (getSession().isPersistent()) { Manager manager = context.getManager(); if (manager == null) { manager = new StandardManager(); context.setManager(manager); } configurePersistSession(manager); } else { context.addLifecycleListener(new DisablePersistSessionListener()); } }
context.addLifecycleListener(lifecycleListener);
private void registerContextListener(Context context) { context.addLifecycleListener(this); }
private void registerContextListener(Context context) { context.addLifecycleListener(this); }
private void registerContextListener(Context context) { context.addLifecycleListener(this); }
private void registerContextListener(Context context) { context.addLifecycleListener(this); }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public void install() { engine.addPropertyChangeListener(this); if (host != null) { host.addContainerListener(this); host.addLifecycleListener(this); } if (context != null) { context.addLifecycleListener(this); } }
public Context addContext(Host host, String contextPath, String dir) { silence(contextPath); Context ctx = new StandardContext(); ctx.setPath( contextPath ); ctx.setDocBase(dir); ctx.addLifecycleListener(new FixContextListener()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addContext(Host host, String contextPath, String dir) { silence(contextPath); Context ctx = new StandardContext(); ctx.setPath( contextPath ); ctx.setDocBase(dir); ctx.addLifecycleListener(new FixContextListener()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }
public Context addContext(Host host, String contextPath, String dir) { silence(contextPath); Context ctx = new StandardContext(); ctx.setPath( contextPath ); ctx.setDocBase(dir); ctx.addLifecycleListener(new FixContextListener()); if (host == null) { getHost().addChild(ctx); } else { host.addChild(ctx); } return ctx; }