When deploying our application (Java, Spring) on Tomcat 7 it is fine. Now that we upgraded to Tomcat 8 it is very slow when serving static content. Looking at developer tools (see snapshot below), each request of static content (small .js and .css files) it takes as much as we have configured for connectionTimeout in server.xml. Because default is 20000, it may take 20 secs. for each file. When dropping this to 1000 it will be faster, and take 1 sec. for each one.
This happens in different development machines using default configurations. Other processes (web services requests, etc.) are performing ok.
I wonder what and where to start looking.
The plugin described below (pjl-comp-filter) was used as a CompressionFilter, which turned out not to be compatible with Tomcat 8 as per an open issue in Github for ziplet (its successor) : https://github.com/ziplet/ziplet/issues/6
I replaced it with one of these solutions and it worked :
So former configuration, non working with Tomcat 8 was :
Dependency in pom.xml :
<dependency> <groupId>org.sourceforge</groupId> <artifactId>pjl-comp-filter</artifactId> </dependency>
And web.xml :