将 Grails 项目和 Java web 项目添加到 EAR 项目
Adding Grails Project and Java web project to EAR project
我想通过向其中添加 Grails 2.5.4 项目和 Java Web 项目来创建 EAR 项目。它将部署到 WAS 8.5.5 服务器。这个想法是使用 WAS 的会话上下文共享在这两个应用程序之间共享会话。 PL。让我知道这是否可能。截至目前,EAR 仅将 grails 应用程序识别为 JAR,因此它不会在 WAS 中部署时爆炸。为此,我正在使用 GGTS,并在 IDE
中集成了 WAS 开发人员 tools/WAS 运行时
您可以通过GGTS 创建EAR 项目和Java Web 项目,然后将Web 项目添加到EAR。那么你生成的 application.xml 将有一个 web 模块条目,如下所示:
<module>
<web>
<web-uri>TestWeb.war</web-uri>
<context-root>TestWeb</context-root>
</web>
</module>
然后添加grails 应用程序条目。您修改后的 application.xml 现在将有两个条目:
<module>
<web>
<web-uri>TestWeb.war</web-uri>
<context-root>TestWeb</context-root>
</web>
</module>
<module>
<web>
<web-uri>TestGrails.war</web-uri>
<context-root>TestGrails</context-root>
</web>
</module>
导出 ear 文件并添加 grails war 文件(在构建项目后创建),使用 this 问题的答案中给出的常用 zip 实用程序。然后就可以在WAS中部署ear文件了
我想通过向其中添加 Grails 2.5.4 项目和 Java Web 项目来创建 EAR 项目。它将部署到 WAS 8.5.5 服务器。这个想法是使用 WAS 的会话上下文共享在这两个应用程序之间共享会话。 PL。让我知道这是否可能。截至目前,EAR 仅将 grails 应用程序识别为 JAR,因此它不会在 WAS 中部署时爆炸。为此,我正在使用 GGTS,并在 IDE
中集成了 WAS 开发人员 tools/WAS 运行时您可以通过GGTS 创建EAR 项目和Java Web 项目,然后将Web 项目添加到EAR。那么你生成的 application.xml 将有一个 web 模块条目,如下所示:
<module>
<web>
<web-uri>TestWeb.war</web-uri>
<context-root>TestWeb</context-root>
</web>
</module>
然后添加grails 应用程序条目。您修改后的 application.xml 现在将有两个条目:
<module>
<web>
<web-uri>TestWeb.war</web-uri>
<context-root>TestWeb</context-root>
</web>
</module>
<module>
<web>
<web-uri>TestGrails.war</web-uri>
<context-root>TestGrails</context-root>
</web>
</module>
导出 ear 文件并添加 grails war 文件(在构建项目后创建),使用 this 问题的答案中给出的常用 zip 实用程序。然后就可以在WAS中部署ear文件了