1 Reply Latest reply on Jul 5, 2006 11:39 AM by Chris Rose

    getResourceAsStream in ear/jar

    Pat Osterday Newbie

      I'm trying to load an XSL file into a POJO that's packaged in a JAR deployed within an EAR, but nothing I try seems to work. It worked when deployed in a WAR in the EAR.

      I've tried:

      String xslFile = "file.xsl"; // xslFile IS in the same dir/package as the class
      InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(xslFile);
      


      String xslFile = "file.xsl"; // xslFile IS in the same dir/package as the class
      InputStream is = this.getClass().getClassLoader().getResourceAsStream(xslFile);
      


      But "is" is always null!

      Thanks,
      Pat