1 Reply Latest reply on Jul 4, 2017 11:16 AM by abhijithumbe

    Is jboss-web.xml mandatory for deploying WAR file on virtual host in JBoss EAP 6 / 7?

    adityan

      I have configured virtual host in JBoss 6.x EAP. Configuration of web subsystem is as follows:

       

      <subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="virtualServer1" native="false">

            <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

           <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

           <connector name="myhttp" protocol="HTTP/1.1" scheme="http" socket-binding="myhttp"/>

           <virtual-server name="default-host" enable-welcome-root="true">

                <alias name="localhost"/>

                <alias name="example.com"/>

           </virtual-server>

           <virtual-server name="virtualServer1" enable-welcome-root="true">

                <alias name="A.technologic.com"/>

           </virtual-server>

           <virtual-server name="virtualServerA" enable-welcome-root="true">

                <alias name="B.technologic.com"/>

           </virtual-server>

      </subsystem>

       

      I also maintain a properties file in my application, where I mention alias name, http/https port and my application context name.

       

      My application is deployed with and without jboss-web.xml. Since I also maintain a property file in my application which stores the said properties, Is "jboss-web.xml" required? If yes, why?

        • 1. Re: Is jboss-web.xml mandatory for deploying WAR file on virtual host in JBoss EAP 6 / 7?
          abhijithumbe

          Application will get deployed with and without jboss-web.xml file. But I dont think specifying virtual-host in properties file will work. Each container has some predefined location for certain info, like context-root,security-domain,virtual-hosts has to be defined in jboss-web.xml file. how container will know to read properties file for virtual-host info ? So defining virtual-host in jboss-web.xml is the only option available if you want to use it.

          1 of 1 people found this helpful