Created attachment 35406 [details] Java 8 / 9 JAR for testing The attached JAR file contains an annotated Servlet 4.0 ServletContextListener with both a Java 8 and Java 9 version. Each version simply outputs the Java version to stdout. When deployed on Tomcat 9, the Java 8 listener is reported whether running on Java 8 or Java 9.
Created attachment 35413 [details] Java 8 / 9 JAR for testing Updated JAR as the original was missing the necessary Manifest entries. Fixing this is going to be 'interesting'. Tomcat currently enumerates the JAR entries as part of the scanning process. The enumeration provided by JarFile is not version aware. I need to do some more research on possible ways of filtering this enumeration efficiently.
Fixed in: - trunk for 9.0.2 onwards - 8.5.x for 8.5.24 onwards - 8.0.x for 8.0.48 onwards - 7.0.x for 7.0.83 onwards