Hi JB, I tried adding alias and also a servlet and i can see the servletContext (/home) registered with paxweb but webconsole still not show any change. I am still getting 404 accessing my servlet and resources. To eliminate possibility of context path conflict, i only install pax-http-whiteboard and my bundle Here are what console show:
karaf@root()> feature:install *pax-http-whiteboard* karaf@root()> kar:install --no-start file:./../irisba/com.castortech.iris.vision.tycho/target/irisba.kar karaf@root()> bundle:list -t 0 -s | grep home 95 | Active | 80 | 1.0.0.201906251633 | com.castortech.iris.ba.web.home karaf@root()> bundle:services 95 Home (95) provides: ------------------- [com.castortech.iris.ba.web.home.IconsResourceService] [com.castortech.iris.ba.web.home.IndexPageResourceService] [org.osgi.service.http.context.ServletContextHelper] [*javax.servlet.ServletContext*] [javax.servlet.Servlet] karaf@root()> service:list javax.servlet.ServletContext [javax.servlet.ServletContext] ------------------------------ osgi.web.version = 1.0.0.201906251633 osgi.web.contextpath = */home* <---correct context path service.id = 138 osgi.web.symbolicname = com.castortech.iris.ba.web.home service.bundleid = 95 service.scope = singleton osgi.web.contextname = *HomeServletContextHelper* Provided by : Home (95) Used by: OPS4J Pax Web - Runtime (91) karaf@root()> service:list javax.servlet.Servlet [javax.servlet.Servlet] ----------------------- service.id = 139 service.bundleid = 95 service.scope = prototype osgi.http.whiteboard.servlet.pattern = /hello osgi.http.whiteboard.context.select = (osgi.http.whiteboard.context.name=*HomeServletContextHelper*) component.name = com.castortech.iris.ba.web.home.HelloServlet component.id = 5 Provided by : Home (95) Used by: OPS4J Pax Web - Extender - Whiteboard (88) karaf@root()> service:list com.castortech.iris.ba.web.home.IndexPageResourceService [com.castortech.iris.ba.web.home.IndexPageResourceService] ---------------------------------------------------------- *alias = /home* service.id = 136 service.bundleid = 95 service.scope = prototype osgi.http.whiteboard.context.select = (osgi.http.whiteboard.context.name=*HomeServletContextHelper*) osgi.http.whiteboard.resource.pattern = / osgi.http.whiteboard.resource.prefix = /index.html component.name = com.castortech.iris.ba.web.home.IndexPageResourceService component.id = 3 Provided by : Home (95) Used by: OPS4J Pax Web - Extender - Whiteboard (88) karaf@root()> service:list com.castortech.iris.ba.web.home.IndexPageResourceService [com.castortech.iris.ba.web.home.IndexPageResourceService] ---------------------------------------------------------- *alias = /home* service.id = 136 service.bundleid = 95 service.scope = prototype osgi.http.whiteboard.context.select = (osgi.http.whiteboard.context.name=*HomeServletContextHelper*) osgi.http.whiteboard.resource.pattern = / osgi.http.whiteboard.resource.prefix = /index.html component.name = com.castortech.iris.ba.web.home.IndexPageResourceService component.id = 3 Provided by : Home (95) Used by: OPS4J Pax Web - Extender - Whiteboard (88) Surprisingly, accessing /home/hello does return the expected test result from my servlet but /home/icons/myicon.png or /home/ still return 404. Do you have other suggestion ? -- Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
