-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ivan,
On 2/25/2010 9:14 AM, Ivan Longhi wrote: > this should be the solution (and one more little question at the end of code): > > conf/web.xml > ------------ > <servlet> > <servlet-name>default</servlet-name> > > <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> > <init-param> > <param-name>listings</param-name> > <param-value>false</param-value> <!-- FALSE to avoid > inheritance to all webapps --> > </init-param> > </servlet> > ------------ This should be the default, so no changes to conf/web.xml should be necessary. > conf/server.xml > ------------ > ......... > > <Host name="localhost" appBase="webapps" > unpackWARs="true" autoDeploy="true" > xmlValidation="false" xmlNamespaceAware="false"> > > <Context path="/test" docBase="/path_to_some_dir/"> > <Parameter name="listings" value="true" /> > </Context> You shouldn't declare <Context> elements within conf/server.xml in any currently-supported version of Tomcat. Instead, put everything you need in your webapp's META-INF/context.xml file. Remember that "path" and "docBase" parameters are not allowed. Also, <Parameter name="listings" value="true" /> has no effect whatsoever on your configuration. You can remove it. Given that, you don't even need a META-INF/context.xml since there's nothing to add to the default. > /path_to_some_dir/WEB-INF/web.xml > ------------ > > <web-app ...> > <servlet> > <servlet-name>test</servlet-name> > > <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> > <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>test</servlet-name> > <url-pattern>/</url-pattern> > </servlet-mapping> > </web-app> The above changes to WEB-INF/web.xml are all you need. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuG3p8ACgkQ9CaO5/Lv0PDx2gCguuCNrDrO4sy2HChs99FKotYZ VlkAnAsk0dyM1Kv8ckFuHxiSxW2MH3TT =csil -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org