users@glassfish.java.net

Re: how do you turn off directory listings?

From: <Jan.Luehe_at_Sun.COM>
Date: Tue, 06 Nov 2007 18:54:44 -0800

Hi Scott,

Scott Oaks wrote:

>On Tue, 2007-11-06 at 14:44, glassfish_at_javadesktop.org wrote:
>
>
>>JF,
>>
>>Do you mean to say if I have to turn on the directory-listing on all applications, I have undeploy
>>and then redeploy setting this flag?
>>
>>
>
>Yes he does (not to speak for JF, of course... :-)
>
>
>>Is this because of some code generation magic during deployment?
>>
>>
>
>Yes. This has bitten me before, in this and other contexts -- it turns
>out that the default-web.xml is consulted only during deployment, and
>not during runtime. When an app is deployed, it inherits whatever
>settings are in default-web.xml *at that time*, and a web.xml is built
>based on the web.xml from the war file and whatever settings aren't
>overridden from default-web.xml. That web.xml is stored in the
>generated/j2ee-{apps,modules}/... directory, and that web.xml is the
>only thing that controls an apps behavior during runtime.
>
>

We just filed this issue against deployment:

  https://glassfish.dev.java.net/issues/show_bug.cgi?id=3844
  ("Treat default-web.xml as runtime instead of deploytime option")

Hong has agreed to look into this in the 9.1.1 timeframe.


Jan