java - Restricting javax.servlet.Filter to specific URL pattern -
i'm trying implement filter project in adobe cq 5.6.1. seems nifty used doing some, say, authentication stuff each page gets displayed.
i've read on documentation on filters , i've coded annotations way:
@slingfilter( label = "filter implementation", metatype = true, generatecomponent = true, generateservice = true, order = 1, scope = slingfilterscope.request ) @properties({ @property(name="service.description", value="a filter"), @property(name="sling.filter.pattern", value="/some/path") })
i've compiled code , looked logs, somehow, doesn't seem filtered specific path indicated in sling.filter.pattern. don't seem find samples on how implement i'm in dark feature. i'm sure of don't want filter run on every url gets loaded.
any leads appreciated. thanks!
as mentioned in question's comments, sling.filter.pattern
service property on filters supported v2.4.0 , later of the org.apache.sling.engine
bundle. have updated docs @ http://sling.apache.org/documentation/the-sling-engine/filters.html mention this.
Comments
Post a Comment