karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: 404 when trying to register resources using HttpService and pax-web
Date Wed, 19 Aug 2015 16:03:48 GMT
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é
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message