This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSP and the fly likes Disable Directory Listing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Disable Directory Listing" Watch "Disable Directory Listing" New topic

Disable Directory Listing

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
I have and application in jakarta-tomat..\webapps
say myapps
it have dir's called jsp,html img.
i have to disable the directory listing,i.e if I try to access url
entire directory structure is displayed on browser
can any one help me how can i hide this
thanx a bunch

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63536

I seem to recall this being asked (and answered) somewhere in the Tomcat forum in the not too distant past.
You might to search through that forum for your answer.

[Asking smart questions] [About Bear] [Books by Bear]
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
thanx a bunch Bear
Philip Shanks
Ranch Hand

Joined: Oct 15, 2002
Posts: 189
Just set the <welcome-file> node to point to a default or entry page for your application.

Philip Shanks, SCJP - Castro Valley, CA
My boss never outsources or has lay-offs, and He's always hiring. I work for Jesus! Prepare your resume!
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
thank U Philip Shanks
Ken Januski
Ranch Hand

Joined: Aug 08, 2002
Posts: 130
Also see the following, which suggests setting listings to false in server.xml. That's what I've always done.
Don't get me started about those stupid light bulbs.
subject: Disable Directory Listing
It's not a secret anymore!