Can multiple war files inside an ear have the same context-root in application.xml?

Solution Unverified - Updated -

Issue

  • Is it possible to have the same context root specified for multiple war files inside an ear,something like below
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID" version="6">
  <display-name>ABC_Services</display-name>
  <module>
    <web>
      <web-uri>Test1.war</web-uri>
      <context-root>/test</context-root>
    </web>
  </module>
  <module>
    <web>
      <web-uri>Test2.war</web-uri>
      <context-root>/test</context-root>
    </web>
  </module>
  <module>
    <web>
      <web-uri>Test3.war</web-uri>
      <context-root>/test</context-root>
    </web>
  </module>
</application>

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content