How to run togglz with jetty 9 embeded. I tryed with follow code
ServletHolder togglz = new ServletHolder(TogglzConsoleServlet.class);
togglz.setInitParameter("org.togglz.core.manager.TogglzConfig", "com.citronium.togglz.config.PlansteryTogglzConfig");
togglz.setInitParameter("org.togglz.FEATURE_MANAGER_PROVIDED", "true");
context.addServlet(togglz, "/togglz/*");
EnumSet<DispatcherType> all = EnumSet.of(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.FORWARD,
DispatcherType.INCLUDE, DispatcherType.REQUEST);
context.addFilter(new FilterHolder(new TogglzFilter()), "/togglz/*", all);
I have follow error
o.e.j.u.component.AbstractLifeCycle - FAILED o.e.j.s.ServletContextHandler@6195bb34{/,null,STARTING}: java.lang.IllegalStateException: Could not find any implementation of TogglzConfig or TogglzBootstrap. Please make sure that you have added the required integration modules to your project or register the implementation in your web.xml as described in the 'Configuration' chapter of the documentation. java.lang.IllegalStateException: Could not find any implementation of TogglzConfig or TogglzBootstrap. Please make sure that you have added the required integration modules to your project or register the implementation in your web.xml as described in the 'Configuration' chapter of the documentation.
I think you should set
org.togglz.FEATURE_MANAGER_PROVIDED
tofalse
instead. Setting it totrue
tells Togglz that it should NOT bootstrap a FeatureManager using yourTogglzConfig
implementation and instead try to use a FeatureManager provided by a IoC container like Spring or CDI.BTW: You should also change the mapping for the
TogglzFilter
to/*
so that Togglz works for all requests and not just for requests for URLs starting with/togglz
.