Hi,

Not sure if this helps, but I wrote a blog post a while ago where I also
used a ServletContextListener in my example.

http://blog.vogella.com/2017/04/20/access-osgi-services-via-web-interface/

Maybe it helps in finding the cause.

Are you using the http whiteboard pattern and did you set the required
component property?

Greez,
Dirk

Am Sa., 2. Feb. 2019, 16:07 hat Thomas Driessen via osgi-dev <
osgi-dev@mail.osgi.org> geschrieben:

> Hi,
>
> I just tried to get a ServletContextListener to work, but did not succeed,
> although everything is done as defined by the spec.
>
> Here you can find a minimal example of my setup
> https://github.com/Sandared/io.jatoms.osgi.possiblebugs.scl
>
> The Servlet I'm registering is working fine, but the
> ServletContextListener that I registered too is never called.
> Even if I call getServletContext() from within the Servlet, my Listener is
> never called.
>
> I would have expected the ServletContextListener to be called at least
> once, after a DefaultServletContext has been created by the
> ServletContainer, or am I wrong with this assumption?
>
> Kind regards,
> Thomas
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to