Re: Getting SlingHttpServletRequest in a HTTP Whiteboard

2020-11-17 Thread Bertrand Delacretaz
Hi, On Mon, Nov 16, 2020 at 4:37 PM Roy Teeuwen wrote: > ...how can you register a Filter programmatically that its inside the > SlingHttpServletRequest chain?... As explained at https://sling.apache.org/documentation/the-sling-engine/filters.html , you need a javax.servlet.Filter OSGi service

Re: Getting SlingHttpServletRequest in a HTTP Whiteboard

2020-11-17 Thread Julian Sedding
Hey Roy No this is not possible. The SlingHttpServletRequest is only available once you're "inside" the SlingMainServlet, i.e. in filters or servlets registered within Sling. The HTTP Whiteboard is pure OSGi and filters registered that way are executed before the SlingMainServlet. The order of

Getting SlingHttpServletRequest in a HTTP Whiteboard

2020-11-16 Thread Roy Teeuwen
Hey all, I would like to retrieve the SlingHttpServletRequest in a filter that has been registered through the HTTP whiteboard instead of registering it with OSGi DS and implementing the Filter service interface. Is this possible? The code of the registration of the filter: