1. Requirements
2. Edit %JBOSS_HOME%\ server\default\deploy\jbossweb-tomcat55.sar\server.xml
… … … … … … … … … … … …
<Connector port="8080" address="10.104.46.105"
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
<Connector port="9090" address="10.104.46.106"
maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
emptySessionPath="true"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
… … … … … … … … … … … …
<Host name="10.104.46.105"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
>
<Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve"
cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
transactionManagerObjectName="jboss:service=TransactionManager" />
</Host>
<Host name="10.104.46.106"
autoDeploy="false" deployOnStartup="false" deployXML="false"
configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
>
<Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve"
cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
transactionManagerObjectName="jboss:service=TransactionManager" />
</Host>
3. Add “jboss-web.xml” in war
For ApplicationA
(1) Add statements as follows in “jboss-web.xml”:
<jboss-web>
<context-root>/applicationa</context-root>
<virtual-host>IP1</virtual-host>
</jboss-web>
(2) Then add “jboss-web.xml” file in applicationa.war
Location: WEB-INF
For ApplicationB
(1) Add statements as follows in “jboss-web.xml”.
<jboss-web>
<context-root>/applicationb</context-root>
<virtual-host>IP2</virtual-host>
</jboss-web>
(2) Then add “jboss-web.xml” file in applicationb.war
Location: WEB-INF