5 Replies Latest reply on Jul 1, 2009 4:05 PM by alesj

    Accessing resource in WAR using context class loader

    muellars

      In my JSF applicattion, I used to get access to the faces-config.xml with the following code:

      ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
      URL cfgUrl = classLoader.getResource("WEB-INF/faces-config.xml");
      BufferedReader reader = new BufferedReader(new InputStreamReader(cfgUrl.openStream()));

      That worked ok with JBoss 4.2.x

      With JBoss 5.1.x that does not work anymore. The cfgUrl is null.

      Is there any configuration I need to change in the JBoss? Do you have other suggestions?

      Thanks,