How can I install one Web Application in two context roots in Weblogic 10g?

weblogic, weblogic-10.x

Solution

This is a packaging issue. Package the WAR twice, each with a specific `WEB-INF/weblogic.xml`, to solve it. For the first WAR:

<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app>
  <context-root>my-context-1</context-root>
</weblogic-web-app>

For the second WAR:

<?xml version='1.0' encoding='UTF-8'?>
<weblogic-web-app>
  <context-root>my-context-2</context-root>
</weblogic-web-app>

This will allow you to use standard deployment tools. I don't recommend installing your application as a shared library.

Problem

How can I install one Web Application in two context roots in Weblogic 10g?

Original source