如何在 open-liberty 服务器中部署新应用程序
How to deploy the new application in open-liberty server
如何手动部署应用程序:
如何在 open liberty 中手动部署 application.ear。按照文档进入 /liberty/wlp/usr/servers/defaultserver/dropins
目录。
在管理控制台中,它显示了两个应用程序,一个处于 运行 状态,另一个已停止。
application1.war - Running state
application2.ear - Stopped state (manually dropped in dropins directory)
注意:当从应用程序 2 的管理控制台执行启动操作时。它给出了无法定位 application2.ear 在 server.xml
.
中定义的错误消息
Server.xml:
<webapplication location="dropin/application2.ear" contextRoot="/test">
问题中有很多地方指向错误。
- ear 文件不是 Web 应用程序,因此对 ear 文件使用
webApplication
元素很可能是错误的。如果您想通过 server.xml 配置在 Liberty 中部署一个 ear 文件,您可以使用 enterpriseApplication
.
- 位置字段中可能存在拼写错误,您可能打算使用 dropins 而不是 dropin,这意味着未找到应用程序二进制文件。
- Liberty 不支持在 server.xml 中配置的应用程序被放置在 dropins 中,我们认为这是两个同名的应用程序,不会启动第二个。
任何这些症状都会在管理中心显示两个应用程序,其中一个被停止。根据您的配置,最简单的事情就是删除 server.xml 配置。
如何手动部署应用程序:
如何在 open liberty 中手动部署 application.ear。按照文档进入 /liberty/wlp/usr/servers/defaultserver/dropins
目录。
在管理控制台中,它显示了两个应用程序,一个处于 运行 状态,另一个已停止。
application1.war - Running state
application2.ear - Stopped state (manually dropped in dropins directory)
注意:当从应用程序 2 的管理控制台执行启动操作时。它给出了无法定位 application2.ear 在 server.xml
.
Server.xml:
<webapplication location="dropin/application2.ear" contextRoot="/test">
问题中有很多地方指向错误。
- ear 文件不是 Web 应用程序,因此对 ear 文件使用
webApplication
元素很可能是错误的。如果您想通过 server.xml 配置在 Liberty 中部署一个 ear 文件,您可以使用enterpriseApplication
. - 位置字段中可能存在拼写错误,您可能打算使用 dropins 而不是 dropin,这意味着未找到应用程序二进制文件。
- Liberty 不支持在 server.xml 中配置的应用程序被放置在 dropins 中,我们认为这是两个同名的应用程序,不会启动第二个。
任何这些症状都会在管理中心显示两个应用程序,其中一个被停止。根据您的配置,最简单的事情就是删除 server.xml 配置。