Hi Felix Felix Meschberger schrieb:
Actually, the Sling Main Servlet initializes servlets and filters by calling the respective init(ServletConfig) and init(FilterConfig) methods. The parameters provided by the ServletConfig and/or FilterConfig (the traditional init-param settings) are taken from the OSGi service registration properties. This is actually quite interesting: For example by using declarative services you may have OSGi Configuration (from ConfigurationAdmin) added as service registration properties and thus as ServletConfig or FilterConfig parameters. This means you will have live-configuration support for such parameters !
Interesting indeed! Could you plz elaborate a bit? What do I have to do to have such a servlet of filter properly configurated? Using the scr-plugin, are all @scr.property automatically made available to the filter?
This live-configuration possibility sounds superb for my use case: I am trying to integrate WebCastellum (http://www.webcastellum.org) with Sling. WebCastellum is a web application firewall implemented as filter. This WAF is configured via init-param. The possibilty to configure that WAF in real-time is intriguing...
Cheers CSp