You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Haller, Joe" <Jo...@purchasepro.com> on 2001/10/12 21:57:48 UTC

TC 4.0 and Directory Browsing

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.


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Tomcat 3.2.1 classloader hierarchy

Posted by Brandon Cruz <bc...@norvax.com>.
I am using Tomcat 3.2.1 as the engine for a web application I have built for
several virtual hosts.  As the application changes, I am looking for a way
to be able to let different hosts use different versions of the application.
Currently, everyone is using one version, located in $tomcat_home$/classes.
It seems that if I put a .jar file of the application into
vhost/web-inf/lib, that all these classes are used first, and I can start
putting newer versions in the specific web application's folder.  Is this OK
to do, or does this cause conflicts that I don't notice yet?

Brandon


Re: TC 4.0 and Directory Browsing

Posted by Robin Lee <te...@uls.com>.
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" <Jo...@purchasepro.com> wrote:
> Using stand-alone Tomcat 4.0,
> is there a way to prevent
> directory browsing?
>
> Many thanks,
> J. Haller


Re: TC 4.0 and Directory Browsing

Posted by Janek Bogucki <ja...@yahoo.co.uk>.
Hi J,

Try this

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

hth,
Janek Bogucki

 --- "Haller, Joe" <Jo...@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.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Make a great connection at Yahoo! Personals.
> http://personals.yahoo.com 

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie