Try to make Jetty scan TLDs in nested JARs
Jetty apparently does it differently (different version of Jasper maybe), so you need a unique jarFileURL for each nested JAR (previously they were all set to the parent archive URL). Also added the root of the main archive as a valid document root. For gh-367
This commit is contained in:
@@ -150,6 +150,8 @@ public class JarFileTests {
|
||||
assertThat(jarURLConnection.getContentLength(), greaterThan(1));
|
||||
assertThat(jarURLConnection.getContent(), sameInstance((Object) this.jarFile));
|
||||
assertThat(jarURLConnection.getContentType(), equalTo("x-java/jar"));
|
||||
assertThat(jarURLConnection.getJarFileURL().toString(), equalTo("jar:file:"
|
||||
+ this.rootJarFile));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -212,8 +214,10 @@ public class JarFileTests {
|
||||
URL url = nestedJarFile.getUrl();
|
||||
assertThat(url.toString(), equalTo("jar:file:" + this.rootJarFile.getPath()
|
||||
+ "!/nested.jar!/"));
|
||||
assertThat(((JarURLConnection) url.openConnection()).getJarFile(),
|
||||
sameInstance(nestedJarFile));
|
||||
JarURLConnection conn = (JarURLConnection) url.openConnection();
|
||||
assertThat(conn.getJarFile(), sameInstance(nestedJarFile));
|
||||
assertThat(conn.getJarFileURL().toString(), equalTo("jar:file:"
|
||||
+ this.rootJarFile.getPath() + "!/nested.jar"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -304,7 +308,6 @@ public class JarFileTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("resource")
|
||||
public void verifySignedJar() throws Exception {
|
||||
String classpath = System.getProperty("java.class.path");
|
||||
String[] entries = classpath.split(System.getProperty("path.separator"));
|
||||
|
||||
Reference in New Issue
Block a user