Hi, which version of Karaf/Pax-Web are you using?
regards, Achim 2015-08-19 18:03 GMT+02:00 Jean-Baptiste Onofré <[email protected]>: > Hi, > > did you also registered a servlet or just resources ? > > Regards > JB > > > On 08/19/2015 05:20 PM, jkraushaar wrote: > >> Hi there, >> >> I'm trying to register resources using the HttpService (pax-web >> implementation), but when I access those resources, I get a 404. >> >> I used the chapter "Building an application with custom HttpContext with >> Apache Karaf" in "Apache Karaf Cookbook" as a template and registered a >> shared HttpContext created by the pax-web WebContainer. Then (in another >> bundle) I fetched the HttpService and the HttpContext and registered the >> resources: >> >> service.registerResources("/watch", "/web", context); >> >> The bundle which creates and registers the shared HttpContext is a >> standard >> web project (WAB) which does not use the HttpService to register its >> resources and servlets but has a web.xml file. Also it registers all of >> its >> servlets, filters and resources under the root context ("/"). Might this >> be >> the cause of the 404? >> >> Thanks for your help, >> Jochen >> >> >> >> -- >> View this message in context: >> http://karaf.922171.n3.nabble.com/404-when-trying-to-register-resources-using-HttpService-and-pax-web-tp4041942.html >> Sent from the Karaf - User mailing list archive at Nabble.com. >> >> > -- > Jean-Baptiste Onofré > [email protected] > http://blog.nanthrax.net > Talend - http://www.talend.com > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
