users@glassfish.java.net

Re: virtual directory?

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 25 May 2006 13:46:52 -0700

Hi Jan,

Yes, I see the subtle difference. Can it be summarized as:

- Use directory deployment to configure and "virtualize"
   the context-root so that you can map a URL to a
   particular physical resource. Barring support of symbolic
   links, this facility is not available for doc-root of
   a virtual server.
?

It is an interesting use case for directory deployment.

For those who get intimidated by "Well, do I have to deploy
a Java EE/web app now?" can an alternative exist in modifying
default-web.xml?

Thank you,

Kedar

Jan Luehe wrote:
>
>
> Jan Luehe wrote On 05/25/06 10:10,:
>
>>
>> In contrast, when you rely on a virtual server's docroot, your static
>> resources must not be prefixed by any context root in order to be mapped
>> to the virtual server's docroot, and they must be placed inside the
>> virtual server's docroot, which users generally don't have access to.
>
>
>
> To highlight the differences between the "asadmin deploydir" and
> "virtual server docroot" approaches, let's modify your example to
> use slightly different names:
>
> <Context docBase='/a/b/c' path='/Storage' />
>
>
> - Approach A:
>
> asadmin deploydir --contextroot Storage /a/b/c
>
> Result:
>
> http://<host>:<port>/Storage/myresource
>
> maps to
>
> /a/b/c/myresource
>
> I thought this is what you wanted.
>
>
> - Approach B:
>
> Change virtual server's docroot to
>
> /a/b/c
>
> In order for:
>
> http://<host>:<port>/Storage/myresource
>
> to return the contents of "myresource", the resource must be stored under
>
> /a/b/c/Storage/myresource
>
> which is different from
>
> /a/b/c/myresource
>
>
> Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>