【问题标题】:how to deploy wab files in glassfish如何在 glassfish 中部署 wab 文件
【发布时间】:2011-01-27 07:39:43
【问题描述】:

将 WAR OSGI 文件 (WAB) 部署到 glassfish 3.1 服务器的正确过程是什么?

我将战争文件复制到“glassfish3\glassfish\domains\domain1\autodeploy\bundles\” -> OSGI 将文件识别为捆绑包并将其添加到其容器中。 但是,它不会将战争部署为 Web 应用程序(我无法访问它的 JSP)。 为了使其成为 Web 应用程序,我从 glassfish 管理控制台部署战争。

两次部署同一场战争是否正确? OSGI不应该把它部署为WEB和OSGI吗?

【问题讨论】:

    标签: osgi glassfish-3


    【解决方案1】:

    为了让 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/

    【讨论】:

      【解决方案2】:

      根据最终的 OSGi EE 规范,您只能使用 Web-ContextPath。 Webapp-Context 是一个中间名称。无需再次将 WAB 部署为 WAR,正如此线程中已回答的那样。

      【讨论】:

        猜你喜欢
        • 2013-04-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多