EnumSet<DispatcherType> all = EnumSet.allOf(DispatcherType.class);
FilterHolder gzipFilter = new FilterHolder(new GzipFilter());
gzipFilter.setInitParameter("mimeTypes", "text/html,text/xhtml,text/plain,text/xml,text/javascript,"
+ "application/xhtml+xml,application/xml,application/javascript,application/json");
gzipFilter.setInitParameter("minGzipSize", "860");
webAppContext.addFilter(gzipFilter, "/*", all);
contexts.addHandler(webAppContext);
} catch (Exception e) {
String msg = "Error Configuring Webapp:\n" + e.getClass().getSimpleName() + "\n" + Arrays.toString(e.getStackTrace()).replaceAll(",", "\n");