0

我想使用 jsp 和 servlet 开发一个 Web 应用程序。现在我的疑问是我可以在后端使用 osgi 服务吗?当我想到这种方法时,我明白这是不可能的,因为在客户端我们也需要 osgi 插件来访问服务。但是我仍然需要对这种方法进行良好的专业评论。我知道这可以通过 eclipse RAP 来实现。如果我的问题没有任何意义,请道歉。

4

2 回答 2

0

I'm not sure I follow your question completely. You can certainly develop a web application using OSGi. All you have to do is deploy your war file into the http service of your OSGi container (e.g. jetty in felix). Doing so can be a bit of a pain, though, so consider using PAX-war-extender. Your clients won't care or even know that you are running OSGi.

That said, if you are developing purely a web app, it might not be worth to use OSGi, and you could simply deploy directly on apache/tomact/some application server instead.

于 2012-10-05T07:03:15.030 回答
0

我想你可以,检查码头 osgi 引导项目。您可以像以前一样开发 Web 部件!只需将一些 osgi 元数据添加到 META-INF/MANIFEST.MF 文件中。如果你想获得一些osgi服务,你可以像osgi bundle一样使用ServiceTrack!我们就是这样做的!希望对你有帮助!

于 2013-01-07T15:27:43.300 回答