• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"Locking a directory down"

 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you mark a directory as "unbrowsable" If you don't want people to be able to browse an image directory or something similiar?


-Tad
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you familiar with the "listings" parameter in the default web.xml? It controls the "default" servlet which produces those directory listings.
Bill
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I'm not... but I'll google it. Thanks for giving me a starting point.

-Tad
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hrm since I tried adding the following:

Didn't seem to do anything (possibly b/c I'm using struts?)

-Tad
 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I think I got, I had to declare another servlet/servlet mapping pair of elements in web.xml:


Got stuck for a bit on the servlet-name tag as it didn't like default(which is what I cut/paste from the web.xml in the conf directory).

The above seems to work pretty much how I expected (though I haven't tested the whole app again).


-Tad
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic