webserver - How to Embed Web Server in OSGi Framework? -
i'd know how run http server osgi platform. using equinox , found official info embedding jetty bundle, links dependencies seem broken , overall isn't documented. (http://www.eclipse.org/equinox/server/http_in_equinox.php)
thank you.
just take @ apache felix http service http://felix.apache.org/documentation/subprojects/apache-felix-http-service.html since these designed osgi bundles, run in equinox.
i using whiteboard model, bundle register servlet service property. if want check out, suggest download bndtools , create runtime webconsole , ds. have write hello world servlet:
package com.example; @component(alias="/hello", provide=servlet.class) public myservlet extends httpservlet { public void doget(httpservletrequest req, httpservletresponse rsp) { rsp.setcontenttype("text/plain;charset=utf-8"); rsp.getoutputstream().write("hello world".getbytes("utf-8")); } }
webserver osgi bundle httpserver
No comments:
Post a Comment