config.getProperties().put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES, org.apache.brooklyn.rest.filter.HaHotCheckResourceFilter.class.getName());
config.getProperties().put(ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX, "(/?|[^?]*/assets/[^?]+\\.[A-Za-z0-9_]+)");
config.getFeatures().put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, true);
FilterHolder filterHolder = new FilterHolder(new ServletContainer(config));
context.addFilter(filterHolder, "/*", EnumSet.allOf(DispatcherType.class));
<BUG>ManagementContext mgmt = (ManagementContext) context.getAttribute(BrooklynServiceAttributes.BROOKLYN_MANAGEMENT_CONTEXT);
config.getSingletons().add(new ManagementContextProvider(mgmt));</BUG>
config.getSingletons().add(new ShutdownHandlerProvider(shutdownListener));
}
private static void installBrooklynFilters(ServletContextHandler context, List<Class<? extends Filter>> filters) {

config.getProperties().put(ResourceConfig.PROPERTY_RESOURCE_FILTER_FACTORIES, org.apache.brooklyn.rest.filter.HaHotCheckResourceFilter.class.getName());
config.getProperties().put(ServletContainer.PROPERTY_WEB_PAGE_CONTENT_REGEX, "(/?|[^?]*/assets/[^?]+\\.[A-Za-z0-9_]+)");
config.getFeatures().put(ServletContainer.FEATURE_FILTER_FORWARD_ON_404, true);
FilterHolder filterHolder = new FilterHolder(new ServletContainer(config));
context.addFilter(filterHolder, "/*", EnumSet.allOf(DispatcherType.class));
ManagementContext mgmt = OsgiCompat.getManagementContext(context);
config.getSingletons().add(new ManagementContextProvider(mgmt));
config.getSingletons().add(new ShutdownHandlerProvider(shutdownListener));
}
private static void installBrooklynFilters(ServletContextHandler context, List<Class<? extends Filter>> filters) {
