Search in sources :

Example 1 with SparkFilter

use of spark.servlet.SparkFilter in project brave by openzipkin.

the class ITTracingFilter method init.

@Override
public void init(ServletContextHandler handler) {
    handler.getServletContext().addFilter("tracingFilter", TracingFilter.create(httpTracing)).addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
    Dynamic sparkFilter = handler.getServletContext().addFilter("sparkFilter", new SparkFilter());
    sparkFilter.setInitParameter("applicationClass", TestApplication.class.getName());
    sparkFilter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), true, "/*");
}
Also used : Dynamic(javax.servlet.FilterRegistration.Dynamic) SparkFilter(spark.servlet.SparkFilter) DispatcherType(javax.servlet.DispatcherType)

Aggregations

DispatcherType (javax.servlet.DispatcherType)1 Dynamic (javax.servlet.FilterRegistration.Dynamic)1 SparkFilter (spark.servlet.SparkFilter)1