This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to avoid directory listing?

 
Jeppe Sommer
Ranch Hand
Posts: 270
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the users types in an url for a directory ( like http://www.myDomain.com/myApp/dir/ ) tomcat displays the directory listing.

How can I deny permission for the users to see the directory listing. Is it possible to control it in the server.xml?
 
Gerardo Tasistro
Ranch Hand
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is done in the web.xml. Go to conf/web.xml in your tomcat install. Looke for the following code and replace true for false



As shown below

 
Jason Moors
Ranch Hand
Posts: 188
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to change the Default servlet listing parameter in $CATALINA_HOME/conf/web.xml

 
Jeppe Sommer
Ranch Hand
Posts: 270
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. That works :-)
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic