wildfly 9 standalone.xml 文件中主机标记中 default-web-module 属性的用途是什么?

what is the purpose of default-web-module attribute in host tag in standalone.xml file of wildfly 9?

我正在研究 wildfly,

在 standalone.xml 文件中我将主机配置为

standalone.xml :

<host name="wildflyhost1" alias="test.test1.com" default-web-module="test1.war"/>
<host name="wildflyhost2" alias="test.test2.com" default-web-module="test2.war"/>

我的问题是,

default-web-module="test2.war" 是强制性的吗?
当 war 文件在服务器部署中不可用时会发生什么情况?

提前致谢。

default-web-module="test2.war" is mandatory ?

不,这不是强制性的,如果不配置,则默认为ROOT.war。 此配置选项允许您默认将应用程序 "test2.war" 部署到“/”上下文,并且根据 servlet 规范,它将绑定到 /test2

what happens when the war file is not available in server deployments ?

注意,无论哪种方式它都有效,它只是告诉服务器它是否找到了这个名称的部署以将其绑定到“/”上下文。