Hello

Great that you've resolved the issue. Yes - servlet name is very important,
but it should default to FQCN of the servlet.
Pax Web 8 was indeed a major refactoring (to match OSGi R6+ Whiteboard
specification - especially wrt context handling).

There are quite a lot of actual whiteboard examples in
https://github.com/ops4j/org.ops4j.pax.web/tree/main/samples/samples-whiteboard
But also you can see more low-level tests showing different Whiteboard
quirks in
https://github.com/ops4j/org.ops4j.pax.web/tree/main/pax-web-itest/pax-web-itest-server/src/test/java/org/ops4j/pax/web/itest/server/whiteboard

Your HTTP 404 for http://localhost:8181/frontend-karaf-demo/ request is
related to lack of "welcome files" registered to the context. There's no
default here.

regards
Grzegorz Grzybek

pon., 29 sie 2022 o 19:44 Steinar Bang <s...@dod.no> napisaƂ(a):

> >>>>> Steinar Bang <s...@dod.no>:
>
> > The web context is defined like this:
> >
> https://github.com/steinarb/frontend-karaf-demo/blob/master/src/main/java/no/priv/bang/demos/frontendkarafdemo/FrontendDemoServletContextHelper.java#L8
>
> > The top servlet is defined like this
> >
> https://github.com/steinarb/frontend-karaf-demo/blob/master/src/main/java/no/priv/bang/demos/frontendkarafdemo/ReactServlet.java#L16
>
> > Am I doing something obviously wrong here?
>
> Looks like I need to have a
>  @HttpWhiteboardServletName("frontend-demo")
> annotation on the ReactServlet.
>
> I put it there and rebuilt the application and now it works.
>
>

Reply via email to