aspose file tools*
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
JavaRanch » Java Forums » Java » JSP
Bookmark "Disable Directory Listing" Watch "Disable Directory Listing" New topic
Author

Disable Directory Listing

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 635
Hi,All
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
http://192.168.1.30/myapps
or
http://192.168.1.30/myapps/jsp
entire directory structure is displayed on browser
can any one help me how can i hide this
thanx a bunch
cheers


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

Joined: Jan 10, 2002
Posts: 61221
    
  66

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.
hth,
bear


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

Joined: Feb 10, 2001
Posts: 635
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.
PCS


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: 635
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.
http://www.coderanch.com/t/280246/JSP/java/Disabling-directory-listing-Tomcat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable Directory Listing