this is because tomcat expects that the 2 jars servlet-api.jar and
jsp-api.jar are in the same classloader
because org.apache.tomcat.util.descriptor.DigesterFactory has this method:
private static String idFor(String url) {
URL id = ServletContext.class.getResource("resources/" + url);
if (id == null) {
id = ServletContext.class.getResource("jsp/resources/" + url);
}
return id.toExternalForm();
}
thats kind of wrong, because ServletContext is in servlet-api but the
"jsp/resources/" dir is in the jsp-api.jar
so ServletContext should not be used to get the "jsp/resources" from the
js-api.jar
i think the code should be something like
private static String idFor(String url) {
URL id = ServletContext.class.getResource("resources/" + url);
if (id == null) {
id = JspContext.class.getResource("resources/" + url);
}
return id.toExternalForm();
}
So that at least the right classloader that also loads the JspContext is
used to get the jsp resources.
--
Johan Compagner
Servoy