I'm following this example to register a JSP file.
However, the org.ops4j.pax.web.service.WebContainer service is not initialized.
The initialization of that service happens in the Activator of the Pax-web-Runtime bundle.
protected void updateController(Dictionary<String, ?> dictionary,
ServerControllerFactory controllerFactory)
But the code is a bit weird.
if (!initialConfigSet) {
initialConfigSet = true;
this.config = dictionary;
this.factory = controllerFactory;
dynamicsServiceTracker = new ServiceTracker<>(
bundleContext, ServerControllerFactory.class,
new DynamicsServiceTrackerCustomizer());
dynamicsServiceTracker.open();
return;
=========
}
so, the code inside the block runs, and the method returns.
It seems this method is designed to be invoked twice. But the second call never happens and the code that initializes the WebContainer service is never executed:
===============
httpServiceFactoryReg = bundleContext.registerService(
new String[] { HttpService.class.getName(), WebContainer.class.getName() },
new HttpServiceFactoryImpl() {
@Override
HttpService createService(final Bundle bundle) {
return new HttpServiceProxy(new HttpServiceStarted(
bundle, serverController, serverModel,
servletEventDispatcher, configuration.get(PROPERTY_SHOW_STACKS)));
}
}, props);
==============
In my environment, Eclipse Equinox, PAX web is tied to the Servlet Bridge (HttpService).
Any idea?
Pablo