File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable Directory Listing

 
Praful Thakare
Ranch Hand
Posts: 642
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Praful Thakare
Ranch Hand
Posts: 642
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx a bunch Bear
 
Philip Shanks
Ranch Hand
Posts: 189
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just set the <welcome-file> node to point to a default or entry page for your application.
PCS
 
Praful Thakare
Ranch Hand
Posts: 642
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank U Philip Shanks
 
Ken Januski
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic