You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mustafa Yalniz <ya...@bumed.org.tr> on 2003/09/12 13:36:50 UTC

web.xml listing="false" does not work

Hi,

We are trying to disable directory listing in our application when the user 
enters URL with slash at the end i.e. 
http://localhost:8080/cocoon/application/  instead 
of  http://localhost:8080/cocoon/application.

We changed web.xml in both /opt/jakarta/tomcat/conf and in /cocoon/WEB-INF/ 
so that the listing parameter is false.

     <init-param>
       <param-name>listings</param-name>
       <param-value>false</param-value>
     </init-param>


But despite this we are still getting directory listing in case the user 
enters URL with slash at the end.

Has anybody had the same problem.

We are using Tomcat version 4.0.4-73, Cocoon version 2.0.4 and Apache 
version 1.3.26-57

Any help would be greatly appreciated.

Thank you and regards,
Mustafa


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: web.xml listing="false" does not work

Posted by Mustafa Yalniz <ya...@bumed.org.tr>.
Hi,
Thanks for the response.

At 15:25 12.09.2003 +0200, you wrote:
> > But despite this we are still getting directory listing in case the
>user
> > enters URL with slash at the end.
>
>Are you sure that your sitemap for <application> does not include
>something like:
><map:match pattern="">
>     [some instruction to give a directory listing]
></map:match>

We do not have such a pipeline.

>You can prevent the listing problem by redirecting the request by addng
>the follwing to your sitemap for <application>
>
><map:match pattern="">
>     <map:redirect-to
>uri="<the-page-that-should-be-displayed-when-url-ends-with-slash>"/>
></map:match>

We have tried this and seems does not work.

>If you only have a cocoon level sitemap then include this:
><map:match pattern="application">
>     <map:redirect-to
>uri="application/<the-page-that-should-be-displayed-when-url-ends-with-s
>lash>"/>
></map:match>

We have this pipeline as well but does not work.





>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org

Thanks for the response again.

Best regards,
Mustafa


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: web.xml listing="false" does not work

Posted by John Williams <jo...@ennui.co.za>.
> But despite this we are still getting directory listing in case the
user
> enters URL with slash at the end.

Are you sure that your sitemap for <application> does not include
something like:
<map:match pattern="">
    [some instruction to give a directory listing]
</map:match>
You can prevent the listing problem by redirecting the request by addng
the follwing to your sitemap for <application>

<map:match pattern="">
    <map:redirect-to
uri="<the-page-that-should-be-displayed-when-url-ends-with-slash>"/>
</map:match>

If you only have a cocoon level sitemap then include this:
<map:match pattern="application">
    <map:redirect-to
uri="application/<the-page-that-should-be-displayed-when-url-ends-with-s
lash>"/>
</map:match>






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org