Hi,

Christian Sprecher schrieb:
> 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?

Yes. And if you have the scr plugin generate the Metatype data (not
setting metatype="no" on the @scr.component tag) you will be able to
configure the properties on the Configuration page of the Web Console.

> 
> 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...

Interesting. Would you be able to provide some description of this in
the Wiki ? Thanks in advance.

Regards
Felix

> 
> Cheers
> 
> CSp
> 

Reply via email to