Description
In OSGi environment, BundleClassLoader is used to get jar file resource. , and the conn (refer the code below) is BundleURLConnection, and will never be JarURLConnection. This causes faces configuration files under jar file can not be accessed in OSGi environment.
Code segment from myfaces-impl-2.0.2-sources\org\apache\myfaces\view\facelets\util\Classpath.java
for ( Enumeration<URL> urls = loader.getResources(resource); urls.hasMoreElements(); )
{
URL url = urls.nextElement();
URLConnection conn = url.openConnection();
conn.setUseCaches(false);
conn.setDefaultUseCaches(false);
JarFile jar;
if (conn instanceof JarURLConnection)
else
{ jar = _getAlternativeJarFile(url); }if (jar != null)
{ _searchJar(loader, result, jar, prefix, suffix); } else
{
if (!_searchDir(result, new File(URLDecoder.decode(url.getFile(), "UTF-8")), suffix))
}
}