Hi,
On Tue, Sep 1, 2015 at 8:19 PM, Mark Thomas <markt_at_apache.org> wrote:
> As I have said previously on this thread, web applications are meant to
> be independent of the context path at which they are deployed. Anything
> that encourages web application developers to think that they can code
> to a specific context path is a bad idea.
There is one specific case to consider that's maybe a bit different;
but for automated tests like happen in the Java EE 7 samples project
as well as the Mojarra test suite, one builds hundreds of wars and
dynamically (e.g. via Arquillian or Cargo) deploys these against a
range of different servers. The test code (which runs outside the
container) then has to know the URL at which each war was deployed.
This is probably much more straightforward if the context root was
known by each test in advance. Mojarra now uses glassfish-web.xml for
this, so the test suite can't easily be run against other servers. See
e.g.
https://github.com/omnifaces/mojarra/blob/master/test/javaee8/facelets/src/main/webapp/WEB-INF/glassfish-web.xml
Kind regards,
Arjan Tijms