Fix JSP availability check when not running as a packaged war

See gh-12859
This commit is contained in:
Mandap
2018-04-14 02:03:18 +08:00
committed by Andy Wilkinson
parent b35e1ad232
commit 82465cf435

View File

@@ -38,7 +38,8 @@ public class JspTemplateAvailabilityProvider implements TemplateAvailabilityProv
ClassLoader classLoader, ResourceLoader resourceLoader) {
if (ClassUtils.isPresent("org.apache.jasper.compiler.JspConfig", classLoader)) {
String resourceName = getResourceName(view, environment);
return resourceLoader.getResource(resourceName).exists();
return resourceLoader.getResource(resourceName).exists() ||
resourceLoader.getResource("file:./src/main/webapp" + resourceName).exists();
}
return false;
}