May be you should use the DS annotions for this @Component(service =
javax.servlet.Filter.class, name ="Sample Filter", configurationPid =
"org.foo.core.filters.SampleFilter", property = { "process.label= Sample
Filter", EngineConstants.SLING_FILTER_SCOPE + "=" +
EngineConstants.FILTER_SCOPE_REQUEST, "pattern='/content/foo/en/'",
"resourceTypes=" + SampleFilter.RESOURCE_TYPE,
Constants.SERVICE_RANKING+ ":Integer=0"}) When I used these annotations
the calls started working. Reference:
https://git...