Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2012-08-27 08:12:44 +0000
committerJan Bartel2012-08-27 08:12:44 +0000
commit6ab68f0dda616e25bd961c4cd4801895e960d21d (patch)
tree4a9eef2dd42861704977a23a2bec1ec5475ddd32
parent28667f170765f8042b4fd131fac446480ec501de (diff)
downloadorg.eclipse.jetty.project-6ab68f0dda616e25bd961c4cd4801895e960d21d.tar.gz
org.eclipse.jetty.project-6ab68f0dda616e25bd961c4cd4801895e960d21d.tar.xz
org.eclipse.jetty.project-6ab68f0dda616e25bd961c4cd4801895e960d21d.zip
387943 Catch CNFE when no jstl jars are installed
-rw-r--r--jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java
index be599f50f4..2d1cecd2bb 100644
--- a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java
+++ b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java
@@ -139,17 +139,23 @@ public class WebappRegistrationCustomizerImpl implements WebappRegistrationCusto
public URL[] getJarsWithTlds(DeploymentManager deployer, BundleFileLocatorHelper locatorHelper) throws Exception
{
+ ArrayList<URL> urls = new ArrayList<URL>();
HashSet<Class<?>> classesToAddToTheTldBundles = new HashSet<Class<?>>();
// Look for the jstl bundle
// We assume the jstl's tlds are defined there.
// We assume that the jstl bundle is imported by this bundle
// So we can look for this class using this bundle's classloader:
- Class<?> jstlClass = WebappRegistrationCustomizerImpl.class.getClassLoader().loadClass(DEFAULT_JSTL_BUNDLE_CLASS);
-
- classesToAddToTheTldBundles.add(jstlClass);
+ try
+ {
+ Class<?> jstlClass = WebappRegistrationCustomizerImpl.class.getClassLoader().loadClass(DEFAULT_JSTL_BUNDLE_CLASS);
- ArrayList<URL> urls = new ArrayList<URL>();
+ classesToAddToTheTldBundles.add(jstlClass);
+ }
+ catch (ClassNotFoundException e)
+ {
+ LOG.info("jstl not on classpath", e);
+ }
for (Class<?> cl : classesToAddToTheTldBundles)
{
Bundle tldBundle = FrameworkUtil.getBundle(cl);

Back to the top