You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2006/05/21 21:36:25 UTC
svn commit: r408470 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
Author: bommel
Date: Sun May 21 12:36:24 2006
New Revision: 408470
URL: http://svn.apache.org/viewvc?rev=408470&view=rev
Log:
made resource loading more Java EE conform
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java?rev=408470&r1=408469&r2=408470&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/context/ResourceLocator.java Sun May 21 12:36:24 2006
@@ -109,7 +109,8 @@
ThemeParser parser = new ThemeParser();
try {
LOG.info("Loading tobago-theme.xml");
- Enumeration<URL> urls = getClass().getClassLoader().getResources("META-INF/tobago-theme.xml");
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+ Enumeration<URL> urls = classLoader.getResources("META-INF/tobago-theme.xml");
while (urls.hasMoreElements()) {
URL themeUrl = urls.nextElement();
@@ -126,7 +127,6 @@
LOG.info("themeUrl = '" + themeUrl + "'");
String fileName = themeUrl.toString().substring(
protocol.length() + 1, themeUrl.toString().indexOf("!"));
- ClassLoader classLoader = ResourceManagerFactory.class.getClassLoader();
URL jarFile;
try {
jarFile = new URL(fileName);