Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Tomcat
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Tomcat
"Locking a directory down"
Tad Dicks
Ranch Hand
Posts: 264
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
Posts: 13078
6
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No I'm not... but I'll google it. Thanks for giving me a starting point.
-Tad
Tad Dicks
Ranch Hand
Posts: 264
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hrm since I tried adding the following:
<init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param>
Didn't seem to do anything (possibly b/c I'm using
struts
?)
-Tad
Tad Dicks
Ranch Hand
Posts: 264
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Ok I think I got, I had to declare another servlet/servlet mapping pair of elements in web.xml:
<servlet> <servlet-name>default1</servlet-name> <servlet-class> org.apache.catalina.servlets.DefaultServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Standard ActionServlet Mapping --> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default1</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
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
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Adding parameters to ActionForward
final keyword
Jar how to ignore certain file types/directories?
JDBC ....hmmmm
Simple links
More...