By the way, I think you can workaround adding alias service property. Regards JB
On 21/06/2019 23:49, ntle wrote: > Hello, > > I'm using karaf 4.2.6 to host a simple web bundle, the bundle is installed, > ServletContextHelper, resource service started but i cannot access any > resource, the web console show my servlet deployed to the wrong context. > Here is the output from the karaf console: > > karaf@root()> bundle:list -t 0 -s | grep home > 133 | Active | 80 | 1.0.0.201906212128 | > com.castortech.iris.ba.web.home > karaf@root()> bundle:services 133 > > Home (133) provides: > -------------------- > [com.castortech.iris.ba.web.home.IconsResourceService] > [com.castortech.iris.ba.web.home.IndexPageResourceService] > [org.osgi.service.http.context.ServletContextHelper] > [javax.servlet.ServletContext] > karaf@root()> service:list > org.osgi.service.http.context.ServletContextHelper > [org.osgi.service.http.context.ServletContextHelper] > ---------------------------------------------------- > service.id = 226 > osgi.http.whiteboard.context.name = HomeServletContextHelper > service.bundleid = 133 > service.scope = bundle > component.name = com.castortech.iris.ba.web.home.HomeServletContextHelper > osgi.http.whiteboard.context.path = /home > component.id = 4 > Provided by : > Home (133) > Used by: > OPS4J Pax Web - Extender - Whiteboard (88) > > karaf@root()> service:list > com.castortech.iris.ba.web.home.IconsResourceService > [com.castortech.iris.ba.web.home.IconsResourceService] > ------------------------------------------------------ > service.id = 224 > service.bundleid = 133 > service.scope = bundle > osgi.http.whiteboard.context.select = > (osgi.http.whiteboard.context.name=HomeServletContextHelper) > osgi.http.whiteboard.resource.pattern = /icons/* > osgi.http.whiteboard.resource.prefix = /icons > component.name = com.castortech.iris.ba.web.home.IconsResourceService > component.id = 2 > Provided by : > Home (133) > Used by: > OPS4J Pax Web - Extender - Whiteboard (88) > > As you can see, the servlet context should be /home and the icon resource > service should be /home/icons/* but on the web console: > > <http://karaf.922171.n3.nabble.com/file/t498183/webconsole.png> > > I got no error from karaf log. Can someone advise what i am missing? > > Thai > > > > -- > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html > -- Jean-Baptiste Onofré [email protected] http://blog.nanthrax.net Talend - http://www.talend.com
