Search code examples
javaxmlwildflywildfly-8hosts

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


am working on wildfly,

in standalone.xml file i have configured hosts as

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"/>

My Question is,

default-web-module="test2.war" is mandatory ?
what happens when the war file is not available in server deployments ?

Thanks in advance.


Solution

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

    No it is not mandatory, it defaults to ROOT.war if not configured. This config option allows you to deploy application "test2.war" to "/" context as by default and by servlet spec it would get bound to /test2

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

    Noting, it works either way, it just tells server if it finds deployment by this name to bound it to "/" context.