tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Xu ...@cybershop.ca>
Subject Re: Directory browsing
Date Wed, 17 Oct 2001 16:22:07 GMT
Mark Muffett wrote:

> Can someone remind me what to do to stop users browsing directories?
> (Tomcat v4.0.1).
>
> I've looked at the docs and just can't find the right words for looking it
> up.
>
> Many thanks
>
> Mark

2*good= =better emails for you   haha :-)


************************************************goodgooddirectory browsing :-)

Hi J,

Try this

http://mikal.org/interests/java/tomcat/archive/view?mesg=42578

hth,
Janek Bogucki

 --- "Haller, Joe" <Joe.Haller@purchasepro.com> wrote:
> Using stand-alone Tomcat 4.0,
> is there a way to prevent
> directory browsing?
>
> Many thanks,
> J. Haller
>
>
> -----Original Message-----
> From: Jeff Corliss [mailto:jeffcorliss@yahoo.com]
> Sent: Friday, October 12, 2001 12:44 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Pathing (relative or not relative, I don't
> want to care)
>
>
> Ok, I'm just about ready to tear my hair out.
> It's been my (mis)understanding so far that when you
> start off a path with "/", then when that path gets
> processed it will be relative to the webapp context.
>
> For example: if my web app is "mywebapp", and I'm
> currently surfing
>
"http://some.com/mywebapp/someplace/deep/thishere.jsp",and
> that .jsp causes a form action or forward to a path
> given as "/some/other/place/gohere.jsp", then the
> user
> should wind up at
>
"http://some.com/mywebapp/some/other/place/gohere.jsp".
>
> This doesn't work out to be the case though.  Is
> there
> anyway to setup my URLs so that I don't have to care
> about "where the user is right now" to ensure that
> the
> user gets to where they should go next?
>
> Using Tomcat 3.2.3, btw.
>
---------------------------------------------------------------------------
Perfect.
Many thanks.
J. Haller
------------------------------------------------------------------------
Even easier.

In your conf dir, edit your web.xml directory.

Locate this section:
  <!-- ================== Built In Servlet Definitions
==================== -->

And change:

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

to

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

Then, to make sure, place an index.jsp (or htm/html) that will forward to
another page that is ok for the user to go to.

I've done this, and it works great for me.

Good Luck,

...Robin
 --- "Haller, Joe" <Joe.Haller@purchasepro.com> wrote:
> Using stand-alone Tomcat 4.0,
> is there a way to prevent
> directory browsing?
>
> Many thanks,
> J. Haller
***********************************************************************************



Bo
Oct.17, 2001




Mime
View raw message