I've tried to register the following ResourceMapping
as an OSGi service:
package ru.focusmedia.odp.server.poim.http;
import org.ops4j.pax.web.extender.whiteboard.ResourceMapping;
import ru.focusmedia.odp.server.poim.api.PoimConfig;
import aQute.bnd.annotation.component.Component;
@Component(immediate = true)
public class PoimResourceMapping implements ResourceMapping {
private String httpContextId;
private String alias = "...";
private String someAbsolutePath = "...";
@Override
public String getHttpContextId() {
return httpContextId;
}
@Override
public String getAlias() {
return "/resources";
}
@Override
public String getPath() {
return someAbsolutePath;
}
}
but don't see the result in browser under http://127.0.0.1:8282/resources/aFileUnderMyPath
. I can see that Pax Web is accessing my mapping in the log. Is this possible or do I need to write a servlet instead?