Lookup component classes in WEB-INF/classes if not found in the root.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1050411 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
index 39a2023..3ff7a2c 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
@@ -583,10 +583,14 @@
}
JarEntry je = m_inputJar.getJarEntry(classname);
if (je == null) {
- throw new IOException("The class " + classname + " connot be found in the input Jar file");
- } else {
- return m_inputJar.getInputStream(je);
+ // Try in WEB-INF/classes (WAR files)
+ je = m_inputJar.getJarEntry("WEB-INF/classes/" + classname);
+ if (je == null) {
+ // If still null, throw an exception.
+ throw new IOException("The class " + classname + " connot be found in the input Jar file");
+ }
}
+ return m_inputJar.getInputStream(je);
} else {
// Directory
File file = new File(m_dir, classname);