cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon Cocoon.java
Date Wed, 11 Apr 2001 15:51:40 GMT
dims        01/04/11 08:51:39

  Modified:    src/org/apache/cocoon Tag: xml-cocoon2 Cocoon.java
  Log:
  Fix for Class Loader problems for loading cocoon.roles
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.70  +4 -2      xml-cocoon/src/org/apache/cocoon/Cocoon.java
  
  Index: Cocoon.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/Cocoon.java,v
  retrieving revision 1.4.2.69
  retrieving revision 1.4.2.70
  diff -u -r1.4.2.69 -r1.4.2.70
  --- Cocoon.java	2001/04/10 17:09:03	1.4.2.69
  +++ Cocoon.java	2001/04/11 15:51:38	1.4.2.70
  @@ -11,6 +11,7 @@
   import java.io.File;
   import java.io.FileNotFoundException;
   import java.io.IOException;
  +import java.io.InputStream;
   import java.net.URL;
   import java.util.HashMap;
   import java.util.Enumeration;
  @@ -49,7 +50,7 @@
    *
    * @author <a href="mailto:fumagalli@exoffice.com">Pierpaolo Fumagalli</a>
(Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version CVS $Revision: 1.4.2.69 $ $Date: 2001/04/10 17:09:03 $
  + * @version CVS $Revision: 1.4.2.70 $ $Date: 2001/04/11 15:51:38 $
    */
   public class Cocoon extends AbstractLoggable implements Component, Initializable, Disposable,
Modifiable, Processor, Contextualizable {
       /** The application context */
  @@ -137,7 +138,8 @@
               p = (Parser)this.componentManager.lookup(Roles.PARSER);
               SAXConfigurationHandler b = new SAXConfigurationHandler();
               ClassLoader cl = (ClassLoader) this.context.get(Constants.CONTEXT_CLASS_LOADER);
  -            InputSource is = new InputSource(cl.getResourceAsStream("/org/apache/cocoon/cocoon.roles"));
  +            InputStream inputStream = ClassUtils.getResource("org/apache/cocoon/cocoon.roles").openStream();
  +            InputSource is = new InputSource(inputStream);
               p.setContentHandler(b);
               is.setSystemId(this.configurationFile.toExternalForm());
               p.parse(is);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message