Hello

With Pax Web 8, fragment bundles attached to WAB are searched for
"META-INF/resources/" resource - each such resource is added to WAB
resource path. See for example
https://github.com/ops4j/org.ops4j.pax.web/tree/web-8.0.15/samples/samples-war/war-required/src/main/resources/META-INF

samples/samples-war/war-required and samples/samples-war/war-requiring are
_wired_ using Require-Bundle relationship, but normal fragment should also
work.

Mind that "META-INF/resources" is the recommended approach, specified in
Servlet API specification and handled fully in Pax Web 8+.

Whiteboard is not an implementation of Web Application specification and
while bundles can register Whiteboard services into the same target web
context, it's not possible that two bundles register resources for the same
mapping to create kind of _overlay_.

regards
Grzegorz Grzybek

śr., 11 sty 2023 o 11:03 Jochen Walz <[email protected]>
napisał(a):

> Hi,
>
> With Karaf 4.3.6 / Pax Web 7.3.23, I had used a WAB to provide some HTML
> files for online help, and - depending on the parts of my application which
> are installed - fragment bundles with additional help files. The war
> feature handled that correctly.
>
> With Karaf 4.4.2, I wanted to switch to using the pax-web-http-whiteboard,
> providing a resource service in my main help bundle with appropriate
> settings for HTTP_WHITEBOARD_RESOURCE_PATTERN and
> HTTP_WHITEBOARD_RESOURCE_PREFIX. Looks bit more lightweight than a WAB.
>
> The HTML files from my main help bundle are served correctly, but not the
> ones from the fragment bundles.
>
> So: does somebody know an (easy) way to make resources in fragment bundles
> visible for the resource service, assumed that all fragments are already
> installed when the bundle with the resource service is started? Possibly
> some example exists somewhere. Or would that lead so far that it is by far
> easier to just keep the WAB approach with the pax-web-war feature?
>
> Thanks & Regards,
> Jochen
>

Reply via email to