0 Replies Latest reply on May 9, 2019 6:59 AM by smita_patil

    How to deploy different war files with same context root and different ports on JBOSS EAP 7.1??

    smita_patil

      Hello All,

       

      I have two war (App1.war, App2.war) files. I need same context root for them with different port.

      E.g.:

      For App1.war - http://app1Host:8081/app

      For App2.war - http://app2Host:8091/app

       

       

      1. I have changed standalone.xml file as below:

      i. Under undertow :

      <server name="app1-server">

      <http-listener name="app1-listener" socket-binding="app1-config-manager"/>

      <host name="app1Host" alias="app1Host" default-web-module="App1.war"/>

      </server>

       

      <server name="app2-server">

      <http-listener name="app2-listener" socket-binding="app2-config-manager"/>

      <host name="app2Host" alias="app2Host" default-web-module="App2.war"/>

      </server>

       

      ii.  Under socket-binding-group :

      <socket-binding name="app1-config-manager" port="8081"/>

      <socket-binding name="app2-config-manager" port="8091"/>

       

      2. Made changes in jboss-web.xml as below:

      For App1.war >>

      <jboss-web>

      <context-root>app</context-root>

      <server-instance>app1-server</server-instance>

      <virtual-host>app1Host</virtual-host>

      </jboss-web>

       

      For App2.war >>

      <jboss-web>

      <context-root>app</context-root>

      <server-instance>app2-server</server-instance>

      <virtual-host>app2Host</virtual-host>

      </jboss-web>

       

      Bur it is not working as expected.

       

      Thank for help in advance.