Injection of ServletContext worked (as can be seen earlier in this
thread).
But it turns out it wasn't needed because the Shiro AbstractFilter class[1]
extends ServletContextSupport[2], and saves the ServletContext when
receiving the FilterConfig[3].
So shiro filters already have the
Hello
So I tried
> @Reference(target = "(osgi.web.contextname=authservice)")
> and that worked just fine: the setter was called and the @Activate
> method was called and the bundle became active.
>
I just checked what pax web is doing and it's:
> Steinar Bang :
>> [snip!]
>>> objectClass = [javax.servlet.ServletContext]
>>> osgi.web.contextname = authservice
>>> osgi.web.contextpath = /authservice
>>> osgi.web.symbolicname = no.priv.bang.authservice.web.security
>>> Hm... so why don't I get service injections when trying to filter
> Steinar Bang :
> [snip!]
>> objectClass = [javax.servlet.ServletContext]
>> osgi.web.contextname = authservice
>> osgi.web.contextpath = /authservice
>> osgi.web.symbolicname = no.priv.bang.authservice.web.security
>> Hm... so why don't I get service injections when trying to filter on the
> Steinar Bang :
[snip!]
> objectClass = [javax.servlet.ServletContext]
> osgi.web.contextname = authservice
> osgi.web.contextpath = /authservice
> osgi.web.symbolicname = no.priv.bang.authservice.web.security
> Hm... so why don't I get service injections when trying to filter on the
>
> Grzegorz Grzybek :
> As you can see, the properties you're looking for are there. Please
> check `bundle-services -p` command (or Karaf 4 equivalent) to check
> what can you filter by.
Thanks, Grzegorz!
Yep, the properties are present:
karaf@root()> bundle:services -p 63
Authentication
Hi
AFAIR, those properties are already supported in Pax Web.
Regards
JB
On Mon, Mar 23, 2020 at 12:25 AM Steinar Bang wrote:
> > Grzegorz Grzybek >:
>
> >> Will it be possible to get a ServletContext OSGi service injected into a
> >> @Reference, when using the web whiteboard of OSGi 7?
>
> Grzegorz Grzybek :
>> Will it be possible to get a ServletContext OSGi service injected into a
>> @Reference, when using the web whiteboard of OSGi 7?
>>
> Sure - it's described in 128.3.4 Publishing the Servlet Context chapter of
> CMPN specification and I think it should already be a
Hello
I'm just in the process of reviewing Pax Web 8.0.0-SNAPSHOT for upcoming
Karaf 4.3.0 release. There's lot to review, because some important
Whiteboard implementation aspects are not handled correctly in Pax Web
(mapping a servlet to multiple ServletContexts for example).
Will it be
I'm currently using shiro 1.5.0 with web whiteboard in karaf 4.2.8.
I'm using some deprecated Shiro classes to set up shiro, and I want to
get rid of using the deprecated classes.
The first snag I've encountered when replacing the deprecated classes is
that the IniWebEnvironment class needs a
10 matches
Mail list logo