Discussions

General J2EE: same web-uri different context-root

  1. same web-uri different context-root (2 messages)

    Is it possible to have the same web module configured to be accessible from different context-roots within the same EAR. wsad is not allowing this.

    Threaded Messages (2)

  2. No[ Go to top ]

    J2EE spec disallows this, so WSAD should disallow it too. J2EE defines the application deployment descriptor for an EAR as having one context root. What would be the point in 2 context roots for one app? Users have a choice...?

    Of course you can alias different URLs within a single context root on the HTTP webserver, thereby achieving something similar to what you seem to be looking for.
  3. No[ Go to top ]

    J2EE spec disallows this, so WSAD should disallow it too. J2EE defines the application deployment descriptor for an EAR as having one context root. What would be the point in 2 context roots for one app? Users have a choice...?Of course you can alias different URLs within a single context root on the HTTP webserver, thereby achieving something similar to what you seem to be looking for.

    thank you for your reply

    I cannot understand why we cannot have two web modules, with the same codebase (different war names, of course) but put under different context-root's co-exist in the same ear. The two wars are almost same except for some changes in resource references to access different data sources
    thank you