Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 52712 invoked from network); 5 Dec 2005 23:31:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Dec 2005 23:31:36 -0000 Received: (qmail 25045 invoked by uid 500); 5 Dec 2005 23:31:07 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 23405 invoked by uid 500); 5 Dec 2005 23:30:56 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 22748 invoked by uid 99); 5 Dec 2005 23:30:48 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 15:30:48 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ammulder@gmail.com designates 64.233.162.193 as permitted sender) Received: from [64.233.162.193] (HELO zproxy.gmail.com) (64.233.162.193) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 15:10:27 -0800 Received: by zproxy.gmail.com with SMTP id 9so1047592nzo for ; Mon, 05 Dec 2005 15:10:06 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=rVcygKHwWGyJruSk+4zaBJo67dReD6yY8R2nquaUjVSYRxfUWeycbZJhT2fnk6rLR/75vLRuos4M9RKnR1daLpfMU1lFArNDiAaYHbayIqftwx1SGYu4pWIhIE2znPatHr6XCvB0D1ZpbS/v++chXo7RP/OFtK56uxY/d59FEYo= Received: by 10.37.14.38 with SMTP id r38mr5646544nzi; Mon, 05 Dec 2005 15:10:05 -0800 (PST) Received: by 10.37.13.69 with HTTP; Mon, 5 Dec 2005 15:10:05 -0800 (PST) Message-ID: <74e15baa0512051510u3cf75619j963fa31f1d60be3d@mail.gmail.com> Date: Mon, 5 Dec 2005 18:10:05 -0500 From: Aaron Mulder Sender: ammulder@gmail.com To: dev@geronimo.apache.org Subject: Re: Web Containers: Setting for directory listings? In-Reply-To: <4394C36E.9000701@apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <74e15baa0512042013y3e6a55c8n7afb899425adcbc7@mail.gmail.com> <4393EE79.1050603@mortbay.com> <4394B52B.7060503@mortbay.com> <7368f2da097a657c8fb129e05a63848a@yahoo.com> <4394C03C.3020705@apache.org> <76251eacb1f8892a78b3a97224064c35@yahoo.com> <4394C36E.9000701@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N So it sounds like if we add a setting to geronimo-web.xml and if the user sets it, we could take control of this for both containers by explicitly declaring the default servlet (if a default servlet is not declared already) and then setting an init param on that servlet (so long as that init param is not set already). If the user does not set the flag, we won't do anything and it will revert back to the server's default bahavior (or a default servlet configured by the user, if any). Does that all sound right? Thanks, Aaron On 12/5/05, Jeff Genender wrote: > The DefaultServlet is the "catch-all" for the server where can't > process the URL. > > So to do this per web app, I guess you would just need to declare the > DefaultServlet in the specific web.xml...and it should take over for > that context. > > David Jencks wrote: > > We can do the same thing server-wide for jetty using the StaticContent > > servlet. Is there a way to set it in tomcat per web-app? > > > > thanks > > david jencks > > > > On Dec 5, 2005, at 2:33 PM, Jeff Genender wrote: > > > >> I'll explain Tomcat... > >> > >> In the var/catalina/conf/web.xml...change this for the DefaultServlet: > >> > >> > >> listings > >> false > >> > >> > >> Jeff > >> > >> > >> > >> David Jencks wrote: > >>> Again, ignoring tomcat :-) > >>> I don't think just adding a default servlet like that to a > >>> geronimo-web plan would work. However, I think the way to go is to > >>> add a flag to the jetty and jetty-config schemas and have the jetty > >>> deployer set dirAllowed in the default servlet when it copies it in. > >>> I'm not sure what else would be needed offhand. It might run into > >>> problems in identifying that particular servlet, as the copying > >>> mechanism is somewhat generic. > >>> thanks > >>> david jencks > >>> On Dec 5, 2005, at 1:46 PM, Jan Bartel wrote: > >>>> Aaron, > >>>> > >>>> Leaving aside the possibility of genericizing this for both > >>>> tomcat & jetty and just considering the jetty implementation > >>>> for now: > >>>> > >>>> It might be possible to be able to use the same kind of mechanism > >>>> in the geronimo-web.xml file as is used in the deployer plan.xml > >>>> file. That is, put a gbean into the geronimo-web.xml file like > >>>> so: > >>>> > >>>> >>>> class=3D"org.apache.geronimo.jetty.JettyServletHolder"> > >>>> defaultOverride > >>>> >>>> name=3D"servletClass">org.mortbay.jetty.servlet.Default > >>>> 0 > >>>> > >>>> acceptRanges=3Dtrue > >>>> dirAllowed=3Dtrue > >>>> putAllowed=3Dfalse > >>>> delAllowed=3Dfalse > >>>> redirectWelcome=3Dfalse > >>>> minGzipLength=3D8192 > >>>> / > >>>> > >>>> > >>>> that the JettyWebModuleBuilder can use to set up the Default servlet > >>>> for the webapp instead of using the StaticContent gbean from the > >>>> j2ee-jetty-runtime-deployer-plan.xml. > >>>> > >>>> Comments? > >>>> > >>>> regards > >>>> Jan > >>>> > >>>> > >>>> > >>>> Jan Bartel wrote: > >>>>> Aaron, > >>>>> To disable/enable directory listing for Jetty, you > >>>>> must set the initParameter called dirAllowed to false/true for > >>>>> Jetty's default servlet called org.mortbay.jetty.servlet.Default. > >>>>> If I understand correctly, the jetty builder plan.xml sets this to > >>>>> true for the container, but it should be possible to do this on a > >>>>> per-webapp basis. Perhaps by putting a setter on the > >>>>> JettyWebAppContext class that can be referenced from the > >>>>> geronimo-web.xml file? > >>>>> I will take a closer look at this and get back to you. > >>>>> regards > >>>>> Jan > >>>>> Aaron Mulder wrote: > >>>>>> It would be nice to have a settings in the geronimo-web.xml for > >>>>>> whether the web container should return a directory listing or a 4= 04 > >>>>>> error if the request URL points to a directory and there's no welc= ome > >>>>>> file present. > >>>>>> > >>>>>> Do Jetty and Tomcat both support this? Any idea whether it's easy > >>>>>> to do? > >>>>>> > >>>>>> Thanks, > >>>>>> Aaron > >>>>>> > >>>> > >> >