Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse McConnell2012-08-27 16:31:43 +0000
committerJesse McConnell2012-08-27 16:31:43 +0000
commit7e21d6c1592fef070f6fea67bbd78be0c36d9415 (patch)
treed5c2c413474ec4df1a3f135a30819a8df5b9d096
parent94c2dec2e261d144a48b38c24da0146694674c37 (diff)
parent6ab68f0dda616e25bd961c4cd4801895e960d21d (diff)
downloadorg.eclipse.jetty.project-7e21d6c1592fef070f6fea67bbd78be0c36d9415.tar.gz
org.eclipse.jetty.project-7e21d6c1592fef070f6fea67bbd78be0c36d9415.tar.xz
org.eclipse.jetty.project-7e21d6c1592fef070f6fea67bbd78be0c36d9415.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/jetty/org.eclipse.jetty.project
-rw-r--r--jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/WebappRegistrationCustomizerImpl.java14
-rw-r--r--jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java8
2 files changed, 17 insertions, 5 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);
diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
index 89b2218b52..580f363f81 100644
--- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
+++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/TagLibConfiguration.java
@@ -111,7 +111,13 @@ public class TagLibConfiguration extends AbstractConfiguration
//Get the system classpath tlds and tell jasper about them, if jasper is on the classpath
try
{
- Class<?> clazz = getClass().getClassLoader().loadClass("org.apache.jasper.compiler.TldLocationsCache");
+
+ ClassLoader loader = _context.getClassLoader();
+ if (loader == null || loader.getParent() == null)
+ loader = getClass().getClassLoader();
+ else
+ loader = loader.getParent();
+ Class<?> clazz = loader.loadClass("org.apache.jasper.compiler.TldLocationsCache");
assert clazz!=null;
Collection<Resource> tld_resources = (Collection<Resource>)_context.getAttribute(TLD_RESOURCES);

Back to the top