For the testing purposes I need to make Tomcat to respond with late http responses. It is quite clear how to do it for the servlet responses. But it is not clear if I want Tomcat to answer, say with 10000 ms delay for each static file request. How it can be configured?

1 Answer 1


If I read this write - you want to introduce a 10000 ms delay for any incoming request where you are serving a static resource.

The easy way to do this is via a servlet filter mapped to the default servlet.

For brevity ...

doFilter(ServletRequest request, ServletResponse response, FilterChain chain)  {
    chain.doFilter(request, response);

Then map the filter to the default servlet:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .