1 Reply Latest reply on Jul 25, 2005 10:08 AM by Gabriele Garuglieri

    application.xml : 2 web modules for 1 war

    ilya liberman Newbie

      I have a war file inside an ear file that I would like to get "mounted" by tomcat under 2 different context paths. I have attempted to do the following in application.xml:

       <module>
       <web>
       <web-uri>mypp.war</web-uri>
       <context-root>foo</context-root>
       </web>
       </module>
       <module>
       <web>
       <web-uri>myapp.war</web-uri>
       <context-root>bar</context-root>
       </web>
       </module>
      


      I am hoping to be able to examing the context path value at runtime and have that drive some display layout logic (co-branding). XML config above does not to the trick - only the first web module becomes available.

      Any suggestions ?

      Thanks!


        • 1. Re: application.xml : 2 web modules for 1 war
          Gabriele Garuglieri Newbie

          I have the same need/problem, and in my opinion it is a bug.
          Ie the container is not respecting the j2ee 1.4 specs:


          J2EE.8.4.1 Deploying a Stand-Alone J2EE Module
          ...[omissis]...
          4. The deployment tool must allow the Deployer to deploy the same module multiple
          times, as multiple independent applications, possibly with different configurations.
          For example, the enterprise beans in an ejb-jar file might be
          deployed multiple times under different JNDI names and with different configurations
          of their resources.



          J2EE.8.4.2 Deploying a J2EE Application
          ...[omissis]...
          5. The deployment tool must allow the Deployer to deploy the same J2EE application
          multiple times, as multiple independent applications, possibly with different
          configurations. For example, the enterprise beans in an ejb-jar file might
          be deployed multiple times under different JNDI names and with different configurations
          of their resources.
          ...[omissis]...


          Any comment?

          Gabriele