In my Jboss-EAP-6.1
I have deployed a .war
called 'myRealWebApp.war'
I can access my app with this url - http://mywebsite.com/myRealWebApp
I want to configure my webapp 'myRealWebApp'
with multiple context root.
I mean if I access
http://mywebsite.com/appA
http://mywebsite.com/appB
http://mywebsite.com/appC
those 3 contexts 'appA'
,'appB'
,'appC'
points to myRealWebApp.war
(One single war deployed)
Is there anyway I can archive this?
Thanks.
Edit:
Solution found:
I added this code to my standalone-full.xml
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" native="false">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
<rewrite name="rule-1" pattern="^/appA(.*)$" substitution="/myRealWebApp$1" flags="L"/>
<rewrite name="rule-2" pattern="^/appB(.*)$" substitution="/myRealWebApp$1" flags="L"/>
<rewrite name="rule-3" pattern="^/appC(.*)$" substitution="/myRealWebApp$1" flags="L"/>
</virtual-server>
</subsystem>
The key is the flags="L"
Thanks