dev@glassfish.java.net

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

From: Ron Monzillo <Ronald.Monzillo_at_Sun.COM>
Date: Wed, 06 Sep 2006 13:00:55 -0400

Jan Luehe wrote:
>
> I never said I've replaced the internal mapping from "/123" to "/". ;-)
>
> When you declare "123" as your default-web-module, the proposed change
> has the
> mapper map any requests that can't be mapped to any of the deployed
> contexts to
> "/123", but it does not "replace" anything.
>
> You can't just switch back and forth between "/" and "/123", which you
> would do
> if you replaced "/123" with "/".
>
> Some internals (such as the per-context jacc policies) rely on the
> context path
> that was used (and visible) during deployment. They expect a context
> path to
> remain in effect until they've received a corresponding undeploy event
> for that
> context path.
>
AYK, jacc doesn't say anything about default web apps, but when a policy
decision is performed, we need to identify the application/policy
context in which the decision is to be being performed. when someone
accesses a default web module by way of an unmapped context root, then I
would prefer that the application context be that of the default web
module (i.e. /) - and that a default policy be applied, and that the
default policy be defined as part of defining the app as the default web
app; but I think you are pointing out that the policy of the default app
is stored such that it can only be found based on its app specific
context identifer.

would it be possible to explicitly deploy an app as the default, without
changing its status after the fact. A new default could implicitly
override an existing default, and a default app would not have a
specific (e.g. "123") context root.

Ron

> Assume a default-web-module "123" with a context root of "/123" and a
> resource "/test".
> When receiving a request for "/test", the proposed change will make it
> *appear* to the
> container as if the request had been for "/123/test", so any security
> decisions or other
> kinds of decisions can continue to be based on the "/123" context root
> that was
> "advertised" during the deployment of "123".
>
>
> Jan
>