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

    getResourceAsStream in ear/jar

    osterday

      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


        • 1. Re: getResourceAsStream in ear/jar
          offline

          osterday -- I'm having the same issue as you are, here. I don't suppose you've had any luck in resolving it?

          I would love to hear if anyone else has experienced this problem, and what their resolution for it was.