Not sure if you mean for a client application to call a bean within jboss deployed app, such as a jndi.properties file or whether its for your application to gain access to a properties file programatically, such as getClassLoader().getResourceAsStream("??.properties"). but in either case, it just has to reside on the class-path.
Im also facing same problem, both on tomcat and Jboss. I also cannt load Properties file from Web archive WAR file.
Well, basically Im trying to load property file from my Java class, its not a Servlet but bundled within a WAR file. So I cannt use ServletContext.getResourceAsStream() and GetClass().getResourceAsStream either.
Whenever im trying
File file = new File("db.properties");
Properties prop = new Properties();
Its saying FileNotFoundException, coz obviously its trying to loading from wrong path while this path is bundled with WAR.
Do you have experience loading properties froma file in JBoss 3.x? I have done that a lot and never had trouble. I am sorry to say that I don't have JBoss 4.0 experience so I cannot comment on any differences that arise from the version change.
In 3.x we put properties files in the server/default/conf directory or inside the WAR file in WEB-INF/classes. Both of these locations load using getClass().getResourceAsStream() or by loading a resource bundle using the current class loader's methods.
Is there a server/default/conf folder in JBoss 4? Have you tried WEB-INF/classes?