public Server build() { Server server = new StandardServer(); server.setPort(shutdownPort); server.setShutdown(shutdownString); if (enableJSP) { server.addLifecycleListener(new JasperListener()); } for (ServiceConfiguration serviceConfiguration : getServices()) { Service service = serviceConfiguration.build(); server.addService(service); } return server; }
private static void configureServer(Server server) { LifecycleListener jasperListener = new JasperListener(); server.addLifecycleListener(jasperListener); jasperListener.lifecycleEvent(new LifecycleEvent(server, Lifecycle.BEFORE_INIT_EVENT, null)); server.addLifecycleListener(new JreMemoryLeakPreventionListener()); server.addLifecycleListener(new ThreadLocalLeakPreventionListener()); }
private static void configureServer(Server server) { //server.addLifecycleListener(new SecurityListener()); //server.addLifecycleListener(new AprLifecycleListener()); LifecycleListener jasperListener = new JasperListener(); server.addLifecycleListener(jasperListener); jasperListener.lifecycleEvent(new LifecycleEvent(server, Lifecycle.BEFORE_INIT_EVENT, null)); server.addLifecycleListener(new JreMemoryLeakPreventionListener()); //server.addLifecycleListener(new GlobalResourcesLifecycleListener()); server.addLifecycleListener(new ThreadLocalLeakPreventionListener()); }