.addInitParam("header", "Filter").addInitParam("value", "true"),
new FilterInfo("all", SetHeaderFilter.class)
.addInitParam("header", "all").addInitParam("value", "true"))
.addFilterUrlMapping("header", "*.txt", DispatcherType.REQUEST)
.addFilterUrlMapping("all", "/*", DispatcherType.REQUEST);
DeploymentManager manager = container.addDeployment(builder);
manager.deploy();
try {
pathHandler.addPrefixPath(builder.getContextPath(), manager.start());
} catch (ServletException e) {
throw new RuntimeException(e);
}
DefaultServer.setRootHandler(pathHandler);