This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark ""Locking a directory down"" Watch ""Locking a directory down"" New topic
Author

"Locking a directory down"

Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
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

Joined: Mar 22, 2000
Posts: 12761
    
    5
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

Joined: Nov 16, 2004
Posts: 264
No I'm not... but I'll google it. Thanks for giving me a starting point.

-Tad
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
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

Joined: Nov 16, 2004
Posts: 264
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: "Locking a directory down"
 
Similar Threads
WA #1.....word association
Equivalent attribute of cluster in weblogic 9.1 wlst
Test class cannot find other class
installation problem
Where do I go for help with Cattle Drive questions?