getResourceAsStream not working any more
Hi guys,
I am working on a web application which has EJBs. My environment is:
* JDK 1.4.2
* Eclipse 3.0.1 with Lomboz plugin
* JBoss 3.2.3
The folder deployed is "sida.war". There is a "sida.properties" file in sida.war\WEB-INF\classes folder. I have a class "SidaProperties" which manages access to "sida.properties" file. In this class, in its static constructor, i was accessing this file as
InputStream inputStream = SidaProperties.class.getResourceAsStream("/sida.properties");
if ( inputStream ==null )
System.out.println("sida.properties could not be found." );
Every thing was working ok.
Now we are upgrading our environment to:
* JDK 5.0
* Eclipse 3.3 with WTP
* JBoss 4.2.0
Eclipse 3.3 wants projects segregated so I have
* one Utility project where I am keeping all *.java files except EJBs.
* one Dynamic Web project where I am keeping all JSPs.
* one EJB project where I am keeping all my EJBs.
* one EAR project which keeps reference to all three above.
The "sida.properties" file is located in Dynamic Web project while "SidaProperties" class is located in Utility project.
I am still deploying like previously i.e. "sida.properties" file in sida.war\WEB-INF\classes folder but now "SidaProperties" class could not find the "sida.properties" file and I am getting the message:
"sida.properties could not be found."
Any thing which I am missing here?
Thanks

