users@glassfish.java.net

Re: virtual directory?

From: Jan Luehe <Jan.Luehe_at_Sun.COM>
Date: Thu, 25 May 2006 12:04:47 -0700

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