naveent23995593
naveent23995593
19-06-2018
Hi guys
I created htmlfilter servlet ,this servlet how to htmlfilter can be disabled by the bundle configuration: enable.htmlfilter.filter {Boolean}smacdonald2008kautuksahnitim-schwalbeJörg Hohdgordon86Woojinclawsonmghalpin
Jörg_Hoh
Employee
Jörg_Hoh
Employee
19-06-2018
Hi,
The question is unclear to me, maybe you can confirm if I understood it correctly: You have written a servlet, and you want to be able to enable or disable the servlet via OSGI configuration. Is that correct?
The easiest way is to set ConfigurationPolicy to REQUIRED. This ensures that as soon as a OSGI configuration is present the servlet is being instantiated. If there is no OSGI configuration present the servlet is not active (not instantiated).
See acs-aem-samples/SampleOsgiR6AnnotationsImpl.java at master · Adobe-Consulting-Services/acs-aem-sampl... for an example how to do with OSGI annotations.
Jörg
naveent23995593
naveent23995593
19-06-2018
Actually this is requirement
Create an HTML filtering filter as part of the publish tools bundle.
The filter can be disabled by the bundle configuration: enable.htmlfilter.filter {Boolean}
The filter must be disabled by default.
naveent23995593
naveent23995593
19-06-2018
yes what you said,, but it is boolean ,if it is true servlet eanble or dasable..
i followed u shared link but component is not visible in felix console
Jörg_Hoh
Employee
Jörg_Hoh
Employee
19-06-2018
If the component is not visible, you haven't created a configuration for it. If you use the approach I described above (using ConfigurationPolicy) you cannot use the OSGI webconsole to do it, but you need to create an OSGI configuration in the repository. And if that configuration exists (and only then), the component will be started.
Jörg
jane-e
jane-e
24-06-2018
This is not a comment about the Forums, and this thread needs to be moved from Forum Comments to the correct forum. Which Adobe software is it about?
Jörg_Hoh
Employee
Jörg_Hoh
Employee
24-06-2018
it's about AEM.
jane-e
jane-e
24-06-2018
Thank you, Jörg, for moving it!