> From: Tim Funk [mailto:funk...@apache.org] > Subject: Re: listing directory content outside tomcat root > > Since the default servlet is declared in conf/web.xml - its inherited > in *every* webapp. So its config is also inherited. (Bummer)
Not a bummer at all - it's a very good thing. > BUT - if you add a WEB-INF/web.xml to EVERY webapp with the default > servlet settings - then you can remove the default servlet config from > conf/web.xml and have the default servlet per webapp config. Not needed and way more work than necessary. > What I forget is - what happens if you only create > /path_to_some_dir/WEB-INF/web.xml and leave conf/web.xml > alone. Which of course would be the easiest thing to do. And it's what you should do. <url-pattern> elements in a webapp's WEB-INF/web.xml override the ones in the global conf/web.xml, so put the following in /path_to_some_dir/WEB-INF/web.xml: <servlet> <servlet-name>localDefault</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>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>localDefault</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org