karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Jebakumar <jeba.r...@gmail.com>
Subject Loading Resources with Jetty in Karaf
Date Sat, 04 May 2013 17:56:35 GMT
Hi,

I have a bundle which supplies css/img folder. I tried with below code,
looks like jetty is not recognizing it. How to enable files in those
folders be served by Jetty

ServiceReference sRef = context.getServiceReference(HttpService.class
.getName());
HttpService service = (HttpService) context.getService(sRef);
service.registerResources("/", "/htmls", null);
// service.registerResources("/js", "js", null);
String webDir = getClass().getClassLoader().getResource("css")
.toExternalForm();
service.registerResources("/css", webDir, null);
service.registerResources("/img", "/img", null);

Files are put insider bundle. In eclipse devlopment, we have an unpack
option which solved the issue in Eclipse. But in karaf, i am not sure how
to make jetty to work with this.



*Clement Jebakumar,*
111/27 Keelamutharamman Kovil Street,
Tenkasi, 627 811
http://www.declum.com/clement.html

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message