Domino OSGi servlet <contextRoot>
Domino OSGi servlet <contextRoot>
编写 Domino OSGi servlet 时,您需要为 Web 应用程序指定上下文根。这是在 plugin.xml.
中完成的
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.ibm.pvc.webcontainer.application">
<contextRoot>
/exporter
</contextRoot>
<contentLocation>
WebContent
</contentLocation>
</extension>
</plugin>
服务器上的所有 OSGi servlet 运行 的上下文根是否需要唯一?
在哪里可以找到文档?
是的。上下文根必须是唯一的。
我找不到任何关于 com.ibm.pvc.webcontainer.application
扩展点的有用文档。正如我在评论中提到的,我建议您改为使用 org.eclipse.equinox.http.registry.servlets
扩展点。这就是 DAS 插件实现 servlet 的方式(参见 the DAS plugin.xml). Both extension points are defined by OSGi plugins Domino inherited from elsewhere. That's why the Domino documentation doesn't cover them, but I think you will find more documentation on the equinox
extension point. For example, see Paul Fiore's Domino OSGi Development 幻灯片。其中包括关于创建 servlet 的整个部分。
编写 Domino OSGi servlet 时,您需要为 Web 应用程序指定上下文根。这是在 plugin.xml.
中完成的<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
<extension
point="com.ibm.pvc.webcontainer.application">
<contextRoot>
/exporter
</contextRoot>
<contentLocation>
WebContent
</contentLocation>
</extension>
</plugin>
服务器上的所有 OSGi servlet 运行 的上下文根是否需要唯一?
在哪里可以找到文档?
是的。上下文根必须是唯一的。
我找不到任何关于
com.ibm.pvc.webcontainer.application
扩展点的有用文档。正如我在评论中提到的,我建议您改为使用org.eclipse.equinox.http.registry.servlets
扩展点。这就是 DAS 插件实现 servlet 的方式(参见 the DAS plugin.xml). Both extension points are defined by OSGi plugins Domino inherited from elsewhere. That's why the Domino documentation doesn't cover them, but I think you will find more documentation on theequinox
extension point. For example, see Paul Fiore's Domino OSGi Development 幻灯片。其中包括关于创建 servlet 的整个部分。