Re: listing directory content outside tomcat root
hi christopher, On Thu, Feb 25, 2010 at 9:33 PM, Christopher Schultz wrote: > You shouldn't declare 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. ok, but since /path_to_some_dir/ is outside tomcat root ( $CATALINA_HOME ), how can I tell tomcat to look for /path_to_some_dir/META-INF/context.xml file? -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
ops is useless On Thu, Feb 25, 2010 at 3:14 PM, Ivan Longhi wrote: > > > -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: listing directory content outside tomcat root
thanks!!! this should be the solution (and one more little question at the end of code): conf/web.xml default org.apache.catalina.servlets.DefaultServlet listings false conf/server.xml . .. /path_to_some_dir/WEB-INF/web.xml test org.apache.catalina.servlets.DefaultServlet listings true 1 test / is org.apache.catalina.servlets.DefaultServlet the right solution? thanks, ivan On Thu, Feb 25, 2010 at 1:19 PM, Tim Funk wrote: > Enable listings is "sort of"** a global setting. > > Since the default servlet is declared in conf/web.xml - its inherited in > *every* webapp. So its config is also inherited. (Bummer) > > 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. > > That means - in docBase="/path_to_some_dir/" --> you need > /path_to_some_dir/WEB-INF/web.xml > > 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. > > > -Tim > > On 2/25/2010 6:22 AM, Ivan Longhi wrote: >> >> hi, >> I would like to list the content of a directory outside tomcat root >> without enabling the listings parameter in default servlet. >> >> conf/web.xml >> >> >> default >> >> org.apache.catalina.servlets.DefaultServlet >> >> listings >> false >> >> >> >> >> conf/server.xml >> >> . >> >> > unpackWARs="true" autoDeploy="true" >> xmlValidation="false" xmlNamespaceAware="false"> >> >> >> >> >> >> .. >> >> >> if I try to get a file inside the dir it works ( >> http://localhost:8080/test/some_file.txt ) but if I try to list the >> content of the directory ( http://localhost:8080/test/ ) I get 404. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
listing directory content outside tomcat root
hi, I would like to list the content of a directory outside tomcat root without enabling the listings parameter in default servlet. conf/web.xml default org.apache.catalina.servlets.DefaultServlet listings false conf/server.xml . .. if I try to get a file inside the dir it works ( http://localhost:8080/test/some_file.txt ) but if I try to list the content of the directory ( http://localhost:8080/test/ ) I get 404. any idea? thanks ciao, ivan - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
POST request hangs hup
Hi, I'm running tomcat 6.0.18 with java 1.6.0_13 on a linux box. The only webapp deployed is Sun OpenSSO (http://www.opensso.org) built from source (20090930). Sometimes a tomcat thread hangs hup while serving a POST request (/UI/Login): monitoring tomcat status I see the processing time grows and the thread never ends. When this happens I am not able to shutdown tomcat with shutdown.sh and I need to kill -9 the java process. I think it is not a problem of memory exausted because if I run "top" the memory usage by java process is ok (a few hundreds MB despite CATALINA_OPTS="-Xmx6048M") but the cpu usage is 100%. Is there a way to kill a single thread in tomcat whitout restarting it? Is there a way to limit the max execution time for a single thread/request? thanks, ivan -- ciao, ivan