dev@glassfish.java.net

Re: HEADS-UP: default-web-module optimization

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Thu, 31 Aug 2006 00:13:16 -0700

Jan Luehe wrote:
> By declaring a web module as a default-web-module, you "promote" it
> and give it higher visibility: You can access it without even knowing
> its name, just by accessing "/", which, when you access the GlassFish
> admin port, will give you the "admingui". But you could also access the
> admingui via its configured context root "/asadmin".
>
> You can change a virtual server's default-web-module as you please
> (and your updates will take effect immediately). When you do that, you
> can select among any of the web modules already deployed on the
> virtual server. Say you've deployed web module "123" at "/123", and
> you now want to make it the virtual server's default-web-module. The
> web module will now be available at "/", in addition to "/123" (removing
> it from "/123" would have required an undeploy).
>
> The semantics of default-web-module, as described above, have been around
> for a long time (I believe since iAS7), which is why we need to preserve
> them.

I understand *what* happens. What I don't understand is why we thought
that was a good way to make it work? What's the motivation for having
a single web app be deployed both at a normal context root and at "/"?

Rather than deploying a web app normally and then "promoting" it, why
not simply deploy it at "/" to begin with?

Are we doing this just to remain compatible with Tomcat? (Which begs the
question, why did Tomcat do it this way to begin with?)