final FileResourceManager resourceManager = new FileResourceManager(tmpDir, 10485760);
DefaultServer.setRootHandler(new ResourceHandler().setResourceManager(resourceManager)
.setContentEncodedResourceManager(
new ContentEncodedResourceManager(tmpDir, new CachingResourceManager(100, 10000, null, resourceManager, -1), new ContentEncodingRepository()
.addEncodingHandler("deflate", new DeflateEncodingProvider(), 50, null), 0, 100000, null)));
}