dev@glassfish.java.net

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

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Wed, 30 Aug 2006 14:02:30 -0700

Bill Shannon wrote On 08/30/06 13:04,:

> Jan Luehe wrote:
>
>>
>>
>> Bill Shannon wrote On 08/30/06 00:18,:
>>
>>> It seems weird that a web app would be deployed both with a regular
>>> context root ("/asadmin") and with a context root of "/". Is that
>>> just a side effect of the current implementation? Wouldn't it be
>>> more natural to deploy a web app once, as the default web app, at
>>> the context root of "/"?
>>
>>
>>
>>
>> The current impl deploys a webapp that is referenced as a
>> default-web-app twice: once at its orginal context root ("/asadmin"),
>> and a *copy* of it at "/".
>>
>> The proposed changes will deploy it only once, but will have it
>> serve both "/" and "/asadmin".
>
>
> I guess my question is, what's the motivation for having a single
> web app serve two different context roots? Wouldn't it be more
> common for a special default web app to serve "/" and other web
> apps (if any) to serve other context roots?


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.


Jan


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>