将WAR OSGI文件(WAB)部署到glassfish 3.1服务器的正确过程是什么?
我将war文件复制到"glassfish3\glassfish\domains\domain1\autodeploy\bundles\“-> OSGI将该文件识别为包,并将其添加到其容器中。但是,它不会将war部署为web应用程序(我无法访问它的JSP)。为了使其成为web应用程序,我从glassfish管理控制台部署了war。
将同一场战争部署两次是正确的吗?OSGI不应该将其部署为WEB和OSGI吗?
发布于 2011-01-27 17:42:42
为了让OSGI发现wab,我需要在创建WAB时向"maven-bundle-plugin“添加以下属性:
<configuration>
<instructions>
<Web-ContextPath>/blabla</Web-ContextPath>
<Webapp-Context>/blabla</Webapp-Context>
</instructions>
</configuration>使用这种配置,war应该只复制到autodeploy/bundles。
更多细节(和其他属性)可以在这里找到:http://leshazlewood.com/2010/09/08/osgi-maven-pax-and-web-applications/
发布于 2011-01-28 02:17:16
根据最终的OSGi EE规范,您只需使用Web-ContextPath。Webapp-Context是一个中间名称。不需要再次将WAB部署为WAR,正如本主题中已经回答的那样。
https://stackoverflow.com/questions/4813819
复制相似问题