Hi, You can add a filter on the @Reference to get the right servlet.
However, I have some issues when using whiteboard and now I'm using a dedicated servlet. I will share an example. regards, François [email protected] Le 09/02/2020 à 20:53, Steinar Bang a écrit : > I'm now in the process of switching to shiro 1.5.x from (1.4.1). > > The switch itself was easy: just a switch of the version number in the > maven dependencies. > > But now I'm trying to switch this > > https://github.com/steinarb/authservice/blob/master/authservice.web.security/src/main/java/no/priv/bang/authservice/web/security/AuthserviceShiroFilter.java#L74 > to something like this > > https://github.com/fpapon/shiro-labs/blob/master/karaf-jaxrs/src/main/java/fr/openobject/labs/shiro/karaf/jaxrs/ShiroService.java#L47 > > First hurdle: how do I get hold of the ServletContext in a DS component > for a servlet filter when using the web whiteboard? > > I had hoped the ServletContextHelper would have the servlet context, but > it doesn't. > > Can the servlet context be injected through a @Reference? > > If so: How do one qualify the reference so that one get the right > servletcontext?
