Ok, I am a step further with the integration: I still have to find out about the dynamic providing of init-params, but I do see that the filterConfig is there & populated with the @scr.property values. Good stuff!

Now, there is a problem within the chain handling: the webcastellum filter uses it's own wrapper for requests and response, and supplies it to the chain in the chain.doFilter() call. This leads to a ClassCastException on line 54 of AbstractSlingFilterChain:
...
RequestProgressTracker tracker = ((SlingHttpServletRequest) request).getRequestProgressTracker();
...

I am not sure if this cast is valid in the context of a filter chain. On the other hand I am not sure wether such a use case (filter that manipulates request and response) has a chance to run in Sling.

WDYT?


java.lang.ClassCastException: org.webcastellum.RequestWrapper cannot be cast to
org.apache.sling.api.SlingHttpServletRequest
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter
(AbstractSlingFilterChain.java:54)
at org.webcastellum.WebCastellumFilter.internalDoFilter(WebCastellumFilt
er.java:2610)
at org.webcastellum.WebCastellumFilter.doFilter(WebCastellumFilter.java:
1710)

Reply via email to