Wildfly Multiple Deployment Context Root?

22 views Asked by At

I'm running Wildfly 29. I have two "Dynamic Web Project" deployments. I'm trying to understand why the second apps context root changes to "app2" but the first apps context root is "/" ?

Below are my jboss-web.xml files. When I deploy first app: it works fine at app1domain.com but the second app does not resolve at app2domain.com -- but it does resolve app2domain.com/app2

How to resolve?

FirstApp jboss-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
      http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
   <context-root>/</context-root> 
   <virtual-host>app1</virtual-host>
</jboss-web>

SecondApp jboss-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
      http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
   <context-root>/</context-root> 
   <virtual-host>app2</virtual-host>
</jboss-web>
0

There are 0 answers