0 Replies Latest reply on Sep 9, 2013 3:58 PM by alkoch

    getResourceAsStream() returns NULL under JBoss 7.1 but OK under Tomcat 7




      I am trying to access a file that is located in the WEB-INF folder.  In particular, I have the following line of code in the init() handler of a servlet:


      InputStream s = servletContext.getResourceAsStream(sPath);


      where sPath = File.separator+"WEB-INF"+File.separator+"filename.ini";


      I have been running this under Tomcat 7 with no problem but I am trying to switch over to JBoss 7.1 and with no other changes the same code now returns a NULL. Can someone explain why this is failing under JBoss when it used to work under Tomcat?


      Thank you,