Hello,
I try to use felix embedded in a web application and
to develop a bundle that contains several web
resources (servlets and jsp).
I uses the http service described in OSGi and the
ServiceTracker in order to register my web resources
in the http service with the following class (class
called by the activator of my bundle):
public class HttpServiceTracker extends ServiceTracker
{
public HttpServiceTracker(BundleContext context) {
super(context, HttpService.class.getName(),
null);
}
public Object addingService(ServiceReference
reference) {
HttpService httpService = (HttpService)
context.getService(reference);
try {
httpService.registerResources(
"/myservlet",
"/WebContent", null);
httpService.registerServlet(
"/myservlet/hello",
new MyServlet(),
null, null);
} catch (Exception e) {
e.printStackTrace();
}
return httpService;
}
public void removedService(ServiceReference
reference, Object service) {
HttpService httpService = (HttpService)
service;
httpService.unregister("/myservlet");
httpService.unregister(
"/myservlet/hello");
super.removedService(reference, service);
}
}
I want that my felix container was embedded in a web
application and not a jetty (or other) was embedded in
felix.
In this case, I don't know how to allow my web
container to forward the request to the osgi http
service in order to execute the servlets cointained in
a bundle.
Can you help me to solve this issue or to give me some
adresses to some resources (documentation or howto) on
the web?
Thanks,
Thierry
Take a look at my blog:
http://jroller.com/page/Templth/
(old: http://templth.blogspot.com/)
_____________________________________________________________________________
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]