Open wilkinsona opened 8 years ago
This is still a problem, although the duplicate URLs now have a slightly different form. For example:
war:file:/Users/awilkinson/dev/spring/spring-boot/master/spring-boot-samples/spring-boot-sample-web-jsp/target/spring-boot-sample-web-jsp-2.0.0.BUILD-SNAPSHOT.war*/WEB-INF/lib/spring-core-5.0.0.BUILD-SNAPSHOT.jar
jar:file:/Users/awilkinson/dev/spring/spring-boot/master/spring-boot-samples/spring-boot-sample-web-jsp/target/spring-boot-sample-web-jsp-2.0.0.BUILD-SNAPSHOT.war!/WEB-INF/lib/spring-core-5.0.0.BUILD-SNAPSHOT.jar!/
Jasper scans both
WEB-INF/lib
and the class loader hierarchy for TLDs.StandardJarScanner
does contains some logic that should avoid duplicate scanning:However, the URLs from
WEB-INF/lib
and the classpath do not matching up. For example:The first is returned from the
ServletContext
, the second comes from the class loader and is created by ourJarFile
implementation.A couple of possibilities:
!/
suffix so that the URLs matchWEB-INF/classes
or in a jar inWEB-INF/lib
. Jasper will find them in either of these locations with also looking at the class path.